plugin marketplace remove silently uninstalls all plugins from that marketplace, no clean way to swap source for local dev

Resolved 💬 3 comments Opened May 21, 2026 by Yiqun-Zhao Closed Jun 21, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report / feature request
  • [x] 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 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>/*

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

View original on GitHub ↗

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