Plugin manager does not clean up old versions from cache on upgrade

Resolved 💬 3 comments Opened Mar 5, 2026 by rvaquerocarto Closed Mar 8, 2026

Description

When a plugin is upgraded (e.g., from 1.1.0 to 1.2.0), the plugin manager downloads the new version into a new versioned directory under ~/.claude/plugins/cache/ and updates installed_plugins.json to point to the new path. However, the old version directory is left behind in the cache.

Steps to reproduce

  1. Install a plugin at version 1.1.0
  2. Update the plugin to a newer version (e.g., 1.2.0)
  3. Check the cache directory: ls ~/.claude/plugins/cache/<marketplace>/<plugin>/

Expected behavior

The old version directory (1.1.0) should be removed automatically after a successful upgrade, since installed_plugins.json no longer references it.

Actual behavior

Both 1.1.0/ and 1.2.0/ directories remain in the cache. Only 1.2.0 is referenced in installed_plugins.json.

Impact

  • Unnecessary disk usage accumulating over time
  • Potential confusion about which version is active
  • Users need to manually clean up old versions

View original on GitHub ↗

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