plugin install should support --force flag to clean cached plugin before reinstall
Is your feature request related to a problem?
When reinstalling a Claude Code plugin, the cached version at ~/.claude/plugins/cache/ persists. This causes stale artifacts (old .venv, outdated config, leftover MCP server registrations) to remain, leading to hard-to-debug issues like MCP servers connecting to wrong endpoints or using outdated dependencies.
Currently the only workaround is manually deleting the cache directory before reinstalling:
rm -rf ~/.claude/plugins/cache/<plugin-name>/
claude plugin install <plugin>
Describe the solution you'd like
Add a --force (or --clean) flag to claude plugin install:
claude plugin install --force <plugin>
This should:
- Remove the existing cached plugin directory before installation
- Perform a fresh install as if the plugin was never installed
Alternatives considered
- Documenting the manual
rm -rfworkaround — fragile, users need to know the cache path - Adding a separate
claude plugin clean <plugin>command — viable but adds another command to remember
Additional context
Current plugin install options only support -s, --scope <scope> — no cache management flags exist.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗