Open a terminal and run claude update. If you used the native installer, Claude Code also updates itself in the background, and the new version starts the next time you open it. Homebrew, WinGet, npm and Linux package installs need their own upgrade command, listed below.
claude updateSteps
Not sure how you installed it?
Each install method updates differently. If more than one path prints, you have more than one install; see the fixes below.
- On macOS or Linux, list every claude on your PATH. ~/.local/bin/claude is the native installer.
which -a claude - On Windows PowerShell, do the same.
where.exe claude
Native installer (recommended)
Native installs check for updates on startup and while running. Run the command to update right now.
- Run the update command.
claude update - Read the last line. It ends with "to version" and the number when an update installed, or says "Claude Code is up to date" when you already have the newest one.
- Close and reopen Claude Code. Updates take effect the next time it starts.
Homebrew (macOS, Linux)
Homebrew installs do not update themselves. The claude-code cask follows the stable channel, about a week behind; claude-code@latest gets every release.
- Check which cask you have.
brew list --cask | grep claude-code - Upgrade the cask it printed. For the stable cask:
brew upgrade claude-code - Or, if you have the latest cask:
brew upgrade claude-code@latest
WinGet (Windows)
WinGet installs do not update themselves. Close Claude Code first: Windows can lock the file while it runs.
- Run the upgrade in PowerShell.
winget upgrade Anthropic.ClaudeCode
npm
Use install, not npm update -g. npm update respects the version range from your first install and may not move you to the newest release. Do not use sudo.
- Reinstall the latest version globally.
npm install -g @anthropic-ai/claude-code@latest
Linux packages (apt, dnf, apk)
- Debian or Ubuntu:
sudo apt update && sudo apt upgrade claude-code - Fedora or RHEL:
sudo dnf upgrade claude-code - Alpine:
apk update && apk upgrade claude-code
VS Code extension
- Open the Extensions view in VS Code, find Claude Code, and update it there. The extension has its own version.
Check it worked
- Print the installed version. It shows a number such as 2.1.211 (Claude Code).
claude --version - For more detail, including the result of the last update attempt, run:
claude doctor
If it fails
"Auto-update failed · Run claude doctor" in the session footer
claude doctor only shows the date of the failure. Run the update from your shell instead; if it fails too, it prints the actual error.
claude update"The connection dropped while downloading the update"
Run claude update again; it usually works on the next try. If your network needs a proxy, set HTTPS_PROXY first.
Homebrew installs an older version than you expected
Your cask list may be stale, or you have the stable cask, which runs about a week behind. Refresh Homebrew, then upgrade. If you see "Cask 'claude-code@latest' is not installed", upgrade the cask that brew list --cask shows instead.
brew updatenpm error ENOTEMPTY during the update
Delete the folder npm could not move (macOS and Linux command shown), then run the npm install command above again.
rm -rf "$(npm root -g)/@anthropic-ai/claude-code"The version does not change after updating
You probably have two installs and updated the one that is not first on your PATH. Keep one (the native install is recommended) and remove the others, for example an old npm install:
npm uninstall -g @anthropic-ai/claude-code
Questions people ask
Does Claude Code update automatically?
Yes, if you used the native installer: it checks on startup and while running, downloads in the background, and switches on the next start. Homebrew, WinGet, apt, dnf and apk installs do not. On Homebrew or WinGet you can opt in by setting the environment variable CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE to 1.
Why isn't my Claude Code updating?
The usual reasons: it was installed with a package manager (no auto-update), auto-updates were turned off with DISABLE_AUTOUPDATER, or it follows the stable channel, which is about a week behind. claude doctor shows your install type, the auto-update setting and the last update attempt.
claude doctorHow do I turn off Claude Code auto-updates?
Add DISABLE_AUTOUPDATER set to "1" inside the env block of your settings.json. This only stops the background check; claude update still works. To block every update path, set DISABLE_UPDATES instead.
{ "env": { "DISABLE_AUTOUPDATER": "1" } }How do I stay on the stable version instead of the newest?
Open /config inside Claude Code and set Auto-update channel to stable, or add "autoUpdatesChannel": "stable" to settings.json. Stable is about a week old and skips releases with major regressions.
How do I install a specific version of Claude Code?
Pass the version number to the native installer. On macOS, Linux or WSL (2.1.89 is the docs' example; use the version you want):
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89Related how-tos
- How to update Gemini CLI
Run gemini update or npm install -g @google/gemini-cli@latest. Homebrew steps, how to check your version, common errors, and the Antigravity CLI change.
- All AI how-tos
Every how-to on this site, grouped by tool.
Sources
- Claude Code docs: Advanced setup (Update Claude Code)
- Claude Code docs: Troubleshoot installation and login
- Claude Code docs: Use Claude Code in VS Code
- Claude Code changelog
Last checked: . We re-check this page every month and when the tool ships a release.