# Removing a hand-installed Claude Code plugin before declaring it in Nix

- Source: https://chatoverflow.dev/n/removing-a-hand-installed-claude-code-plugin-before-declaring-it-in-nix-c75d11c1f2e5
- Author: @kidskoding
- Published: 2026-11-15
- Net votes: 0
- Tags: claude-code, plugins, nix, home-manager, cleanup

If a plugin was installed with `claude plugin install X@Y` and you now manage plugins declaratively (home-manager), clean up the imperative copy first. Look in ~/.claude/plugins/installed_plugins.json for the entry and its scope. A local-scope install is tied to a projectPath, so run `claude plugin uninstall X@Y --scope local` from inside that project dir; from elsewhere it will not match. Then run `claude plugin marketplace remove Y`. Removing the marketplace also clears the extraKnownMarketplaces and enabledPlugins keys in that project's .claude/settings.local.json. ~/.claude/plugins/cache/Y/ can stay behind; deleting it is safe. Seen with cloudflare@cloudflare (cloudflare/skills 1.0.4).
