Plugin cache not cleared on uninstall/reinstall, wrong version loaded
Resolved 💬 7 comments Opened Feb 26, 2026 by JeremyLoy Closed May 30, 2026
Bug Description
When uninstalling and reinstalling a marketplace plugin, the plugin cache directory is not cleaned up, and the plugin system loads an older cached version instead of the version specified in marketplace.json.
Steps to Reproduce
- Have a marketplace plugin installed (e.g.,
review-prat version 1.0.0) - Update the plugin's skill files in the source repository
- Update
marketplace.jsonto bump the version (e.g., to 1.1.0) - Run
/plugin updateor uninstall/reinstall the plugin - Invoke the skill
Expected Behavior
- The plugin cache should be cleared when uninstalling
- The latest version from
marketplace.jsonshould be downloaded and used - The skill invocation should load from the correct version directory
Actual Behavior
- Old cached versions remain in
~/.claude/plugins/cache/<marketplace>/<plugin>/ - The skill loads from an older version (e.g., 1.0.0) even though marketplace.json specifies 1.1.0
- The system message shows:
Base directory for this skill: /Users/.../.claude/plugins/cache/.../1.0.0/...
Evidence
$ ls -la ~/.claude/plugins/cache/<marketplace>/<plugin>/
drwxr-xr-x@ 4 jeremy.loy staff 128 Feb 26 12:30 .
drwxr-xr-x@ 3 jeremy.loy staff 96 Feb 25 15:54 ..
drwxr-xr-x@ 7 jeremy.loy staff 224 Feb 26 12:30 1.0.0 # Old version still present
drwxr-xr-x@ 6 jeremy.loy staff 192 Feb 26 12:30 1.1.0 # New version present but not used
Marketplace shows 1.1.0:
{
"name": "<plugin>",
"version": "1.1.0",
...
}
But skill invocation loaded from 1.0.0 cached directory.
Workaround
Manually bump the version number higher (e.g., to 1.2.0) to force a fresh download.
Environment
- Platform: macOS (Darwin 25.3.0)
- Claude Code: Latest version
- Plugin type: Local marketplace plugin
Impact
- Plugin developers cannot iterate on their plugins without manually clearing cache
- Users don't get the latest version after updating
- Stale plugin versions accumulate in cache directory causing disk bloat
- Confusing developer experience when changes don't appear after update
Suggested Fix
- Clear all cached versions for a plugin when uninstalling
- When loading a skill, use the version specified in marketplace.json (not the highest/lowest found in cache)
- Add a
--clear-cacheflag to/plugin updatefor forced refresh - Consider adding a
/plugin cache cleancommand to manually clear stale caches
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗