[Bug] Plugin uninstall does not clear cached files, causing reinstalls to use stale content
Bug Description
Plugin Uninstall Leaves Stale Cache - Reinstall Uses Outdated Files
Summary: When uninstalling a plugin via /plugin uninstall, the cached plugin files in ~/.claude/plugins/cache/ are not removed. Subsequent reinstalls read from the stale cache instead of the source, causing updated plugin content to be ignored.
Steps to Reproduce:
- Install a plugin from a local marketplace (e.g., brand-dave@appydave-plugins)
- Modify a command file in the plugin source (e.g., change commands/solo-deck.md)
- Run /plugin uninstall brand-dave@appydave-plugins
- Run /plugin install brand-dave@appydave-plugins
- Invoke the command (e.g., /brand-dave:solo-deck)
Expected: Command uses the updated content from the source directory.
Actual: Command uses the old cached content from ~/.claude/plugins/cache/appydave-plugins/brand-dave/{version}/.
Investigation Findings:
- installed_plugins.json is correctly updated on uninstall (plugin removed)
- Cache directory at ~/.claude/plugins/cache/{marketplace}/{plugin}/{version}/ is NOT cleared
- On reinstall, the stale cache is reused without re-reading from source
- Multiple version directories accumulate in cache (e.g., 1.0.0/ and 1.1.0/)
Workaround: Manually delete cache: rm -rf ~/.claude/plugins/cache/{marketplace}/{plugin}/
Environment: Claude Code v2.0.76, macOS
Environment Info
- Platform: darwin
- Terminal: iTerm.app
- Version: 2.0.76
- Feedback ID: 688a32db-ab36-4650-a14d-ea45042b9183
This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗