[BUG] tmp_pack Files Consuming 180GB on Ubuntu 24.04 LTS
Description
[BUG] tmp_pack Files Consuming 180GB on Ubuntu 24.04 LTS
Description
OpenCode is creating massive temporary pack files in ~/.local/share/opencode/snapshot/*/objects/pack/ that are never cleaned up, consuming 180.9 GB of disk space. These tmp_pack_* files appear to accumulate over time without any automatic cleanup mechanism.
Environment
- OpenCode version: 1.1.21
- Operating System: Ubuntu 24.04 LTS
- Desktop Environment: Gnome
- Hardware: Thinkpad X390 Yoga 2 (2019)
-
Installation method: Official installer (installed to
~/.opencode/bin/) - Usage context: Via VSCode integrated terminal
Affected Location
~/.local/share/opencode/snapshot/ed610c2ec990659cd5a93f0917806ddcc867e270/objects/pack/
Files Found
Multiple tmp_pack_* files:
-
tmp_pack_L1OcCi- 34.3 GB -
tmp_pack_g8Pw3x- 34.3 GB -
tmp_pack_eBJrkn- 34.3 GB -
tmp_pack_qruqJT- 34.3 GB -
tmp_pack_uhAqV2- 34.3 GB -
tmp_pack_qdZhkE- 6.2 GB -
tmp_pack_Eup0BZ- 1.4 GB -
tmp_pack_j9Ykzw- 1.4 GB -
tmp_pack_yB0FXj- 332.2 MB
Total: ~180.9 GB
Steps to Reproduce
[Unclear - appears to happen during normal OpenCode usage over time]
- Use OpenCode normally over extended period
- Files accumulate in snapshot directory
- No automatic cleanup occurs
Expected Behavior
Temporary pack files should be automatically cleaned up after use or session end.
Actual Behavior
tmp_pack_* files accumulate indefinitely, consuming massive amounts of disk space (180GB+) without any cleanup mechanism.
Workaround
Manual deletion of temp files:
rm -f ~/.local/share/opencode/snapshot/*/objects/pack/tmp_pack_*
Related Issues
This appears to be related to:
- #5617 (Ubuntu 22.04 - 79GB in 10 minutes)
- #6845 (NixOS - 169GB snapshot folder)
Additional Context
- Files were write-protected, requiring
-fflag to remove - This confirms the bug also affects Ubuntu 24.04 LTS (in addition to Ubuntu 22.04)
- Pattern suggests this is a persistent Ubuntu/Linux issue with OpenCode's temp file management
Impact
- Critical disk space consumption
- Can fill entire filesystem
- Affects system stability
- No warning or notification to user
Note: This bug report consolidates the issue affecting multiple Ubuntu versions. The pattern is consistent across Ubuntu 22.04 and 24.04 LTS, as well as NixOS.
Plugins
OpenCode version
1.1.21
Steps to reproduce
No response
Screenshot and/or share link
Operating System
Ubuntu 24.04.3 LTS
Terminal
VSCode Terminal