stack setup
download and installs GHC for project,
~/.stack/programs
,~/.stack/snapshots
and somewhere else which I don't know yet)
stack build
downloads dependencies and build them.~/.stack/setup-exe-cache
and somewhere else.
I want to clean up project-wide ghc and downloaded dependencies/build output from them, plus all the other project related things on my disk.
There's no way to do this other than just manually delete them?
stack clean
command clears local cache in .stack-work
.
The feature for cleaning .stack
cache is not implemented yet. See this GitHub issue:
stack setup
installs GHC for project but it stores GHC globally (so you don't need to install GHC again for another project if this project uses same version of GHC).
You can just do rm -rf .stack-work
to clean project local build cache (built modules, github dependencies for project, etc.). Though, rm -rf .stack-work
won't work for multipackage project. Just do stack clean --full
to clear local cache completely for project.
To clean global cache, you can just do rm -rf ~/.stack
.
Thus, again, citing latest comment from issue discussion:
The garbage collection question definitely needs to be answered in some form or another. If possible, I think I might find a documentation solution preferable to a new command. It would be great if the manual discussed the directory structure of
~/.stack
and explained what directories were safe to delete.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With