Feature request: plugin cache garbage collection (claude plugin gc)
Resolved 💬 3 comments Opened Apr 14, 2026 by devanomaly Closed May 23, 2026
Problem
The plugin cache at ~/.claude/plugins/cache/ accumulates stale artifacts over time with no cleanup mechanism:
- Orphaned plugin versions — When
claude plugin updateinstalls a new version, it drops a.orphaned_atmarker in the old version directory but never deletes it. Over multiple updates, these accumulate.
- Temp clone directories —
temp_git_*directories are created duringplugin add/plugin updategit clone operations but are never cleaned up. In my setup, 35 of these accumulated totaling ~50MB.
- Disabled plugin caches — Disabled plugins retain their full cache. No option to reclaim space.
Current state (real example)
Orphaned versions: 7 directories (~1.6MB)
Temp git artifacts: 35 directories (~50MB)
Active plugin cache: 16 versions
Proposed solution
claude plugin gc
$ claude plugin gc
Scanning plugin cache...
Orphaned versions: 7 (1.6 MB)
Temp clone artifacts: 35 (50.2 MB)
Total reclaimable: 51.8 MB
Remove all? [y/N]
Options:
--dry-run— show what would be removed--force— skip confirmation--keep-last N— retain N previous versions for rollback (default: 0)
Auto-cleanup on update
When claude plugin update succeeds, automatically remove the previous version's cache directory (or at least the temp_git_* used for the clone).
Bulk update
Also useful: claude plugin update --all to update all installed plugins in one command, rather than requiring per-plugin invocations.
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗