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.
- Re-run
claude --versionand a small test prompt.