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

  1. Install a marketplace with plugins (e.g., sefirot-marketplace with brando, bad, etc.)
  2. Observe cache created at ~/.claude/plugins/cache/sefirot-marketplace/brando/1.1.0/
  3. Uninstall the plugin: /plugin → remove brando
  4. Check cache: ls ~/.claude/plugins/cache/sefirot-marketplace/brando/still exists
  5. Remove the entire marketplace: /plugin → remove sefirot-marketplace
  6. 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 to sefirot-marketplace)
  • Renamed plugin source directories leave old cache entries (e.g., bad-plugin/ cache persists after source renamed to bad/)

Expected

  • Plugin uninstall removes the corresponding cache directory
  • Marketplace removal removes the entire marketplace cache directory
  • claude plugin update cleans 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

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗