Bug: Removing marketplace does not clean up associated plugin entries in installed_plugins.json

Resolved 💬 6 comments Opened Jan 9, 2026 by AsiaOstrich Closed Mar 11, 2026

Description

When removing a marketplace via /plugin marketplace remove, the associated plugin entries in ~/.claude/plugins/installed_plugins.json are not cleaned up. This leaves orphaned records that cause persistent "Plugin not found in marketplace" errors.

Steps to Reproduce

  1. Install a plugin from a marketplace (e.g., universal-dev-standards from universal-dev-standards marketplace)
  2. Later, rename or change the marketplace (e.g., from universal-dev-standards to asia-ostrich)
  3. Remove the old marketplace via /plugin marketplace remove universal-dev-standards
  4. Claude Code reports "✔ Removed 1 marketplace"
  5. However, the plugin entry remains in ~/.claude/plugins/installed_plugins.json:
{
  "plugins": {
    "universal-dev-standards@universal-dev-standards": [
      {
        "scope": "user",
        "installPath": "...",
        "version": "3.3.0-beta.2"
      }
    ]
  }
}
  1. Open the plugin management page - see error:
1 error:
  Plugin 'universal-dev-standards' not found in marketplace 'universal-dev-standards'
  → Plugin may not exist in marketplace 'universal-dev-standards'

Expected Behavior

When removing a marketplace, Claude Code should either:

  1. Automatically clean up all plugin entries associated with that marketplace from installed_plugins.json
  2. Or prompt the user: "This marketplace has X installed plugins. Remove them as well?"

Actual Behavior

  • Only the marketplace reference is removed
  • Plugin entries in installed_plugins.json become orphaned
  • Claude Code continues to validate these orphaned plugins against the non-existent marketplace
  • Users see confusing error messages

Workaround

Manually edit ~/.claude/plugins/installed_plugins.json to remove the orphaned plugin entries.

Environment

  • OS: macOS (Darwin 24.6.0)
  • Claude Code version: Latest (as of 2026-01-09)

View original on GitHub ↗

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