Where Does Git LFS Store Cached Files?
Git LFS caches large file objects in an lfs folder inside each repo's git directory. That cache is what prune cleans when disks fill.
Last updated
LFS keeps your repo small by storing pointers in git and the real bytes in a local object cache. That cache lives in an lfs folder inside the repository's git directory, one per clone. Every LFS file you check out or fetch passes through it.
Because the cache is per clone, five clones of one media heavy repo hold five copies of the bytes. The fetch and prune settings in your git config decide how much history stays local. Check those before assuming the cache is broken when it grows.
Where Git LFS stores this, by platform
[Repo]\.git\lfs
Per clone object cache with downloaded bytes under objects. Override it with the storage path setting, and prune old unreferenced objects when the drive fills.
[Repo]/.git/lfs
Same per clone layout as Windows. Linked worktrees share the main repo cache, so pruning from one worktree affects them all.
[Repo]/.git/lfs
Identical to macOS. Server side caches live elsewhere entirely; this path is the client cache developers actually run out of disk on.
Frequently asked questions
How do I reclaim disk space from LFS?
Run the prune command for old unreferenced objects. It keeps anything reachable from recent commits, stashes, or unpushed work, and deletes the rest. Never run it with two repos sharing one custom storage directory.
Can I move the LFS cache elsewhere?
Set the storage path option to a custom directory. Relative paths resolve inside the git folder. Shared storage across repos and pruning do not mix, so leave the default unless you have a reason.
Notice an outdated path? Let us know.