Faqs

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 latest dist-tag was 2.1.202, and the stable dist-tag was 2.1.195. Verify the official changelog and your local install before changing a production setup.

Quick Answer

If your active claude came fromPrefer this update command
Native Claude Code installerclaude update
npm global packagenpm install -g @anthropic-ai/claude-code@latest
Homebrewbrew upgrade claude-code
WinGetwinget upgrade Anthropic.ClaudeCode
aptsudo apt update && sudo apt install claude-code
dnfsudo dnf upgrade claude-code
apksudo 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@latest

Then confirm:

claude --version
npm view @anthropic-ai/claude-code dist-tags --json

Find Your Install Method

Run these checks before updating:

which claude
claude --version
npm list -g @anthropic-ai/claude-code --depth=0

If 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

  1. Check the current version with claude --version.
  2. Read the Claude Code changelog.
  3. Update with the same package manager that installed Claude Code.
  4. Restart any shell, IDE, terminal agent, or CI runner using the old binary.
  5. Re-run claude --version and a small test prompt.