Skip to content

Opencode using up 380GB in ~/.local/share/opencode/snapshot/objects #9601

Closed as duplicate

Description

@peterdonaghey

Description

Image

This is too much

Plugins

None

OpenCode version

1.1.26

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

Image

No response

Terminal

No response

Activity

  1. added
    perfIndicates a performance issue or need for optimization
    on Jan 20, 2026
  2. github-actions commented on Jan 20, 2026

    @github-actions
    Contributor

    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:

    1. Temporary pack files not being cleaned up
    2. Large directories (including ignored files) being tracked without safeguards
    3. Snapshot module ignoring watcher.ignore configuration

    Feel free to ignore if your specific case differs, but these existing issues may provide workarounds or context for the underlying problem.

  3. lzqxd commented on Mar 25, 2026

    @lzqxd

    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.

  4. piknockyou commented on Sep 30, 2026

    @piknockyou

    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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingperfIndicates a performance issue or need for optimization

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions