Claude Update vs npm install: How to Update Claude Code
Choose claude update, npm install -g @anthropic-ai/claude-code@latest, npm update -g, Homebrew, WinGet, apt, dnf, or apk for your install method.
Claude Update vs npm install
Short answer: update Claude Code with the same channel you used to install it.
Last checked on July 7, 2026. The npm
latestdist-tag was2.1.202, and thestabledist-tag was2.1.195. Verify the official changelog and your local install before changing a production setup.
Quick Answer
If your active claude came from | Prefer this update command |
|---|---|
| Native Claude Code installer | claude update |
| npm global package | npm install -g @anthropic-ai/claude-code@latest |
| Homebrew | brew upgrade claude-code |
| WinGet | winget upgrade Anthropic.ClaudeCode |
| apt | sudo apt update && sudo apt install claude-code |
| dnf | sudo dnf upgrade claude-code |
| apk | sudo apk update && sudo apk add -u claude-code |
Why npm update -g Can Disappoint
npm update -g @anthropic-ai/claude-code updates inside the version range npm already knows about. If you installed an older global package with a constrained range, it may not move to the newest latest tag.
Use this when you intentionally want the newest npm release:
npm install -g @anthropic-ai/claude-code@latestThen confirm:
claude --version
npm view @anthropic-ai/claude-code dist-tags --jsonFind Your Install Method
Run these checks before updating:
which claude
claude --version
npm list -g @anthropic-ai/claude-code --depth=0If which claude points into an npm global directory and npm list -g shows the package, use npm. If it points to a native installer path, use claude update.
Safe Update Checklist
- Check the current version with
claude --version. - Read the Claude Code changelog.
- Update with the same package manager that installed Claude Code.
- Restart any shell, IDE, terminal agent, or CI runner using the old binary.
- Run
claude doctorif the native CLI or auto-updater behaves strangely after the update. - Re-run
claude --versionand a small test prompt.
If the search intent is Claude Code release notes or claude doctor command, do not answer only with an install command. Users need to know what changed, whether the active CLI came from npm, native installer, Homebrew, WinGet, apt, dnf, or apk, and whether the update affected MCP, hooks, permissions, or model behavior.