claude-code - 💡(How to fix) Fix plugin marketplace remove silently uninstalls all plugins from that marketplace, no clean way to swap source for local dev

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

  • At minimum: warn the user before removal that N plugins will be uninstalled, with a confirmation prompt.

Root Cause

  1. claude plugin marketplace remove <name> ← required because both sources share the same name from marketplace.json
  2. claude plugin marketplace add /path/to/local/clone
  3. Test locally
  4. claude plugin marketplace remove <name>
  5. claude plugin marketplace add <remote-url> to switch back

Fix Action

Workaround

Use the cache directory as the source of truth and reinstall after the swap:

ls ~/.claude/plugins/cache/<marketplace>/ \
  | xargs -I {} claude plugin install {}@<marketplace>

But this only works if the cache wasn't pruned, and requires the user to know it exists.

Code Example

claude plugin marketplace add git@github.com:<org>/<marketplace-repo>.git
claude plugin install plugin-a@<marketplace>
claude plugin install plugin-b@<marketplace>
claude plugin list   # both shown

claude plugin marketplace remove <marketplace>
claude plugin marketplace add /path/to/local/<marketplace-repo>
claude plugin list   # both gone, despite caches at ~/.claude/plugins/cache/<marketplace>/*

---

ls ~/.claude/plugins/cache/<marketplace>/ \
  | xargs -I {} claude plugin install {}@<marketplace>
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report / feature request
  • I am using the latest version of Claude Code (claude --version: 2.1.146)

What's Wrong?

claude plugin marketplace remove <name> silently uninstalls every plugin that was installed from that marketplace. The plugin folders survive in ~/.claude/plugins/cache/<marketplace>/<plugin>/, but the install records are removed from ~/.claude/plugins/installed_plugins.json, so claude plugin list no longer shows them.

This is a sharp foot-gun during local plugin development. The documented workflow for testing a local branch is:

  1. claude plugin marketplace remove <name> ← required because both sources share the same name from marketplace.json
  2. claude plugin marketplace add /path/to/local/clone
  3. Test locally
  4. claude plugin marketplace remove <name>
  5. claude plugin marketplace add <remote-url> to switch back

Every remove step silently uninstalls all that marketplace's plugins. Users discover this hours/days later when a /plugin-name:command no longer works.

Related but distinct: #47077 reports the opposite problem (cache staying behind). The combination is the worst of both worlds: install records nuked, caches retained.

What Should Happen?

Any of the following would fix this:

  • claude plugin marketplace remove <name> --keep-plugins — keep install records as orphans pending a re-add of the same name.
  • claude plugin marketplace update <name> --source <new-url-or-path> — change source in place without remove/add.
  • claude plugin marketplace add <source> — if a marketplace with the same name already exists, prompt to update the source instead of erroring, preserving installs.
  • At minimum: warn the user before removal that N plugins will be uninstalled, with a confirmation prompt.

Steps to Reproduce

claude plugin marketplace add [email protected]:<org>/<marketplace-repo>.git
claude plugin install plugin-a@<marketplace>
claude plugin install plugin-b@<marketplace>
claude plugin list   # both shown

claude plugin marketplace remove <marketplace>
claude plugin marketplace add /path/to/local/<marketplace-repo>
claude plugin list   # both gone, despite caches at ~/.claude/plugins/cache/<marketplace>/*

Workaround

Use the cache directory as the source of truth and reinstall after the swap:

ls ~/.claude/plugins/cache/<marketplace>/ \
  | xargs -I {} claude plugin install {}@<marketplace>

But this only works if the cache wasn't pruned, and requires the user to know it exists.

Environment

  • claude --version: 2.1.146
  • OS: macOS (darwin 25.4.0)
  • Shell: zsh

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix plugin marketplace remove silently uninstalls all plugins from that marketplace, no clean way to swap source for local dev