| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Adds 'opencode session prune <duration>' command to delete old sessions and free disk space. Features: - Duration format: 1d, 7d, 2w, 1m (days/hours/weeks/months) - --dry-run: preview what would be deleted - --force/-f: skip confirmation prompt - --all/-a: prune all projects (not just current) - --logs: also prune old log files - --snapshots: also prune orphaned snapshot directories Shows estimated space savings before deletion and confirms with user.
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
Sorry, something went wrong.
|
The following comment was made by an LLM, it may be inaccurate: No duplicate PRs found |
Sorry, something went wrong.
|
Closing this upstream PR to keep active work on the fork only. Current workflow: open PRs on dzianisv/opencode, merge into fork main, and do not keep active PRs in anomalyco/opencode. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Summary
Adds opencode session prune <duration> command to delete old sessions and free disk space.
After heavy usage, the ~/.local/share/opencode/storage/ directory can grow to 10+ GB with thousands of old sessions. This command provides a safe way to clean up old data.
Features
Usage Examples
Output
Shows a summary of sessions to be deleted with age, estimated space savings, and asks for confirmation before proceeding.
Testing
Tested manually with --dry-run on a storage directory with 400+ sessions.