Preflight Checklist
What's Wrong?
claude update reports a leftover npm global installation even when @anthropic-ai/claude-code is not installed via npm.
This appears to happen when the native Claude Code launcher is installed at ~/.local/bin/claude and npm's global prefix is also ~/.local. Claude Code seems to classify the launcher path as npm-global based on the npm prefix/bin directory, even though the actual launcher is the native install symlink.
Verified local state:
~/.local/bin/claude -> ~/.local/share/claude/versions/2.1.128
The npm global package is absent:
npm list -g --depth=0 @anthropic-ai/claude-code
# empty / not installed
Running the suggested cleanup command is a no-op:
npm -g uninstall @anthropic-ai/claude-code
# up to date
### What Should Happen?
If `@anthropic-ai/claude-code` is not installed in the npm global package tree, `claude update` should not report a leftover npm global installation.
It should recognize the launcher as native when:
```text
~/.local/bin/claude -> ~/.local/share/claude/versions/<version>
### Error Messages/Logs
```shell
$ claude update
Current version: 2.1.128
Checking for updates to latest version...
Warning: Multiple installations found
- npm-global at /home/<user>/.local/bin/claude
- native at /home/<user>/.local/bin/claude (currently running)
Warning: Leftover npm global installation at /home/<user>/.local/bin/claude
Fix: Run: npm -g uninstall @anthropic-ai/claude-code
Claude Code is up to date (2.1.128)
$ npm -g uninstall @anthropic-ai/claude-code
up to date in 123ms
Steps to Reproduce
-
Install Claude Code using the recommended native installer:
curl -fsSL https://claude.ai/install.sh | bash
-
Use an npm global prefix that resolves to ~/.local:
npm prefix -g
# /home/<user>/.local
-
Verify the Claude launcher is native:
ls -l ~/.local/bin/claude
# ~/.local/bin/claude -> ~/.local/share/claude/versions/2.1.128
-
Verify the deprecated npm package is not installed:
npm list -g --depth=0 @anthropic-ai/claude-code
# empty / not installed
-
Run:
-
Observe that Claude Code reports both npm-global and native at the same launcher path and recommends npm -g uninstall @anthropic-ai/claude-code, even though the npm package is already absent.
Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
Unknown
Claude Code Version
2.1.128 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
The warning disappears if npm's prefix is overridden for the command:
NPM_CONFIG_PREFIX="$HOME/.npm-global" claude update
That suggests the detection is based on npm global prefix/path overlap rather than actual npm package presence.
Impact: this does not block updates, but it creates a persistent misleading warning and recommends a cleanup command that cannot resolve the issue.
Preflight Checklist
What's Wrong?
claude updatereports a leftover npm global installation even when@anthropic-ai/claude-codeis not installed via npm.This appears to happen when the native Claude Code launcher is installed at
~/.local/bin/claudeand npm's global prefix is also~/.local. Claude Code seems to classify the launcher path asnpm-globalbased on the npm prefix/bin directory, even though the actual launcher is the native install symlink.Verified local state:
The npm global package is absent:
npm list -g --depth=0 @anthropic-ai/claude-code # empty / not installedRunning the suggested cleanup command is a no-op:
Steps to Reproduce
Install Claude Code using the recommended native installer:
curl -fsSL https://claude.ai/install.sh | bashUse an npm global prefix that resolves to
~/.local:npm prefix -g # /home/<user>/.localVerify the Claude launcher is native:
Verify the deprecated npm package is not installed:
npm list -g --depth=0 @anthropic-ai/claude-code # empty / not installedRun:
Observe that Claude Code reports both
npm-globalandnativeat the same launcher path and recommendsnpm -g uninstall @anthropic-ai/claude-code, even though the npm package is already absent.Claude Model
Not sure / Multiple models
Is this a regression?
I don't know
Last Working Version
Unknown
Claude Code Version
2.1.128 (Claude Code)
Platform
Anthropic API
Operating System
Ubuntu/Debian Linux
Terminal/Shell
Other
Additional Information
The warning disappears if npm's prefix is overridden for the command:
NPM_CONFIG_PREFIX="$HOME/.npm-global" claude updateThat suggests the detection is based on npm global prefix/path overlap rather than actual npm package presence.
Impact: this does not block updates, but it creates a persistent misleading warning and recommends a cleanup command that cannot resolve the issue.