You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Opencode using up 380GB in ~/.local/share/opencode/snapshot/objects #9601
All of these issues describe the same core problem: OpenCode's snapshot feature is consuming excessive disk space (100GB+) in ~/.local/share/opencode/snapshot/objects/. The root causes appear to be:
Temporary pack files not being cleaned up
Large directories (including ignored files) being tracked without safeguards
My opencode also had the same issue. I simply deleted all the hash files in the snapshot/global/objects directory, and then when I used opencode again, there was no problem anymore.
For anyone landing here: a global snapshot growing that large is usually the sign of sessions running in a broad folder - most commonly the home directory - rather than in a real project. Two quick checks from the folder where you start opencode:
git rev-parse --show-toplevel - if it prints your home folder (or another broad parent folder) instead of a project, a stray/accidental .git there is the cause; delete it (usually empty; rename if unsure) and start opencode inside a real project folder. The oversized snapshots stop growing with it.
If it prints a real project: git ls-files --others --exclude-standard | wc -l - if that is 100k+, move the heavy folders (node_modules, target, caches) into .gitignore, or set "snapshot": false in the config. (And as the comment above did: everything under ~/.local/share/opencode/snapshot/ is opencode's own store - it is safe to clear if it gets out of hand.)
Activity
github-actions commentedon Jan 20, 2026
This issue might be a duplicate of existing issues. Please check:
All of these issues describe the same core problem: OpenCode's snapshot feature is consuming excessive disk space (100GB+) in ~/.local/share/opencode/snapshot/objects/. The root causes appear to be:
Feel free to ignore if your specific case differs, but these existing issues may provide workarounds or context for the underlying problem.
lzqxd commentedon Mar 25, 2026
My opencode also had the same issue. I simply deleted all the hash files in the snapshot/global/objects directory, and then when I used opencode again, there was no problem anymore.
piknockyou commentedon Sep 30, 2026
For anyone landing here: a
globalsnapshot growing that large is usually the sign of sessions running in a broad folder - most commonly the home directory - rather than in a real project. Two quick checks from the folder where you start opencode:git rev-parse --show-toplevel- if it prints your home folder (or another broad parent folder) instead of a project, a stray/accidental.gitthere is the cause; delete it (usually empty; rename if unsure) and start opencode inside a real project folder. The oversized snapshots stop growing with it.If it prints a real project:
git ls-files --others --exclude-standard | wc -l- if that is 100k+, move the heavy folders (node_modules,target, caches) into.gitignore, or set"snapshot": falsein the config. (And as the comment above did: everything under~/.local/share/opencode/snapshot/is opencode's own store - it is safe to clear if it gets out of hand.)