Plugin uninstall/marketplace removal leaves orphaned cache directories
Resolved 💬 3 comments Opened Mar 23, 2026 by reggiechan74 Closed Mar 27, 2026
Description
When a plugin is uninstalled or a marketplace is removed, the corresponding cache directories under ~/.claude/plugins/cache/ are not cleaned up. Over time this accumulates stale plugin data that can cause confusion during debugging and wastes disk space.
Repro
- Install a marketplace with plugins (e.g.,
sefirot-marketplacewith brando, bad, etc.) - Observe cache created at
~/.claude/plugins/cache/sefirot-marketplace/brando/1.1.0/ - Uninstall the plugin:
/plugin→ remove brando - Check cache:
ls ~/.claude/plugins/cache/sefirot-marketplace/brando/→ still exists - Remove the entire marketplace:
/plugin→ remove sefirot-marketplace - Check cache:
ls ~/.claude/plugins/cache/sefirot-marketplace/→ still exists with all plugin dirs
Also observed:
- Renamed marketplace leaves old cache behind (e.g.,
fabula-marketplace/cache persists after marketplace was renamed tosefirot-marketplace) - Renamed plugin source directories leave old cache entries (e.g.,
bad-plugin/cache persists after source renamed tobad/)
Expected
- Plugin uninstall removes the corresponding cache directory
- Marketplace removal removes the entire marketplace cache directory
claude plugin updatecleans up stale cache entries that no longer match the marketplace source
Actual
Cache directories persist indefinitely. Manual rm -rf is required to clean up.
Environment
- Claude Code 2.1.81
- Linux (OrbStack)
🤖 Generated with Claude Code
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗