Where Does Haskell Stack Store Data?
Stack root with snapshots, programs and global project settings on Linux.
Last updated
Stack keeps everything reusable in a root directory in your home folder: compiled snapshots, GHC installs, package indexes and the global project config. Project builds reference this store instead of duplicating it.
Snapshots dominate disk usage and are safe to delete; Stack rebuilds them on demand. Back up config.yaml for mirrors and Docker tweaks, not the gigabytes of builds.
Where Stack stores this, by platform
~/.stack
Holds snapshots of compiled dependencies, programs with GHC installs, indices, and config.yaml for global settings. Project-local state stays in .stack-work inside each repo. Prune with stack purge or targeted snapshot removal. Override the root with STACK_ROOT for another disk.
Frequently asked questions
How do I free Stack disk space?
Delete old snapshots under the directory above or run stack purge per project. The package index and unused GHC versions go the same way.
Where is the Stack global config?
config.yaml directly inside ~/.stack. Project stack.yaml files override it per repo.
Notice an outdated path? Let us know.