How to update Claude Code (and fix a failed update)
Update Claude Code to the latest version: claude update, Homebrew, WinGet, npm or apt. How to tell which install you have, and fixes for failed updates.
Contents
To update Claude Code to the latest version, run claude update. On the native install (the curl … | bash or PowerShell installer) that one command is enough, and the install also updates itself in the background. Homebrew, WinGet, npm and Linux package installs update through their own tool: brew upgrade claude-code, winget upgrade Anthropic.ClaudeCode, npm install -g @anthropic-ai/claude-code@latest, or your system upgrade.
claude --version confirms the number afterwards. The commands, messages and settings on this page are from Anthropic's setup and troubleshooting pages as they read on 22 October 2026.
Check your Claude Code version#
claude --version
It prints something like 2.1.211 (Claude Code). claude doctor in your shell goes further without starting a session: install health, errors in your settings files, and how the last update attempt ended. Inside a session, /status shows the version.
Which install do you have?#
The update command depends on how Claude Code was installed. On macOS and Linux, these four lines tell you:
which -a claude # every claude on your PATH
ls -la ~/.local/bin/claude # native installer: a link into ~/.local/share/claude/versions/
brew list --cask | grep claude-code # Homebrew: claude-code or claude-code@latest
npm -g ls @anthropic-ai/claude-code 2>/dev/null # npm global install
On Windows, where.exe claude lists every claude on your PATH. Two results mean two installs, and the first one on PATH is the one that runs. So an update can succeed and change nothing you see: it went to the copy you don't run.
How to update Claude Code, by install method#
| Install | Update command | Updates itself? |
|---|---|---|
| Native (macOS, Linux, WSL, Windows) | claude update |
Yes, in the background |
| Homebrew (stable) | brew upgrade claude-code |
No |
| Homebrew (latest) | brew upgrade claude-code@latest |
No |
| WinGet | winget upgrade Anthropic.ClaudeCode |
No |
| npm | npm install -g @anthropic-ai/claude-code@latest |
Yes, if npm's global folder is writable |
| apt (Debian, Ubuntu) | sudo apt update && sudo apt upgrade claude-code |
No |
| dnf (Fedora, RHEL) | sudo dnf upgrade claude-code |
No |
| apk (Alpine) | apk update && apk upgrade claude-code |
No |
A successful claude update prints Successfully updated from <old> to version <new>, or Claude Code is up to date (<version>).
- On npm, use
install … @latest.npm update -gkeeps you inside the version range of your original install. Never usesudo npm install -g. - Homebrew keeps old versions on disk;
brew cleanupremoves them. CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1lets a Homebrew or WinGet install update itself: Claude Code runs the upgrade in the background and asks you to restart. On WinGet that can fail while Claude Code is running, because Windows locks the file, and Claude Code then prints the manual command.
Moving from npm to the native install#
For npm permission errors, Anthropic's advice is the native installer, which needs no Node.js and no sudo:
curl -fsSL https://claude.ai/install.sh | bash # macOS, Linux, WSL
irm https://claude.ai/install.ps1 | iex # Windows PowerShell
Then remove the npm copy (npm uninstall -g @anthropic-ai/claude-code) so only one claude is left on your PATH.
Stable or latest: pick a release channel#
Claude Code ships on two channels. latest, the default, gets every release as soon as it's out. stable gets a version typically about a week old and skips releases with major regressions.
Change it in /config › Auto-update channel, or in ~/.claude/settings.json:
{
"autoUpdatesChannel": "stable",
"minimumVersion": "2.1.100"
}
minimumVersion is a floor that updates never go below, so switching to stable won't downgrade you. Homebrew picks the channel by cask name instead, and apt, dnf and apk by repository. A newly launched model can need a newer Claude Code than stable serves; if a model says it needs a newer version, move to latest.
To install one exact version, pass it to the installer: curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89 (or stable).
Fix a failed Claude Code update#
| What you see | What to do |
|---|---|
Auto-update failed · Run claude doctor in red in the footer |
Keep working; nothing is broken. Run claude update in your shell to finish the update or see the real error |
The connection dropped while downloading the update |
Run claude update again. Behind a proxy, set HTTPS_PROXY first, or ask IT to allow downloads.claude.ai |
Download timed out: exceeded the total deadline |
The download took over 10 minutes. Try again from a faster network |
Release verification failed for Claude Code |
Nothing was installed and your current version still works. Run the same command again; if it repeats, report it |
Failed to fetch version from downloads.claude.ai |
Your network blocks the download server. Check your proxy and firewall |
command not found: claude after updating |
The install folder isn't on your PATH: on macOS and Linux, add ~/.local/bin. Then open a new terminal |
'claude' is not recognized right after an update on Windows |
The new claude.exe didn't land. Rename the newest claude.exe.old.* backup in %USERPROFILE%\.local\bin back to claude.exe, or rerun the PowerShell installer |
claude update hangs after Checking for updates |
A folder sits where a shell config file should be (for example ~/.zshrc). Fixed in v2.1.214; on older versions move it aside or rerun the install script |
npm error code ENOTEMPTY |
Delete the folder the error names (and any leftover .claude-code-* folders next to it), then reinstall |
EACCES: permission denied with npm |
Switch to the native installer (above) rather than using sudo |
Error: claude native binary not installed after npm |
npm skipped optional dependencies or install scripts. Reinstall without --omit=optional or --ignore-scripts |
Cask 'claude-code' is unavailable |
Your Homebrew index is old. Run brew update, then install again |
Cask 'claude-code@latest' is not installed |
You have the other cask. brew list --cask | grep claude-code shows which one to upgrade |
When the shell can't find claude at all, the PATH fix for each system and install method is in claude: command not found. Still stuck: claude doctor lists warnings with suggested fixes. A sign-in prompt that starts after an update is usually a credential problem, not the update (Claude Code keeps asking me to log in).
Stop Claude Code from updating#
To keep one version for a demo or a long overnight run, set one of two variables in the env block of ~/.claude/settings.json.
DISABLE_AUTOUPDATER=1stops background updates.claude updatestill works when you choose.DISABLE_UPDATES=1blocks every update, manual ones included. Meant for companies that ship Claude Code themselves.
claude doctor confirms it: the Auto-updates line reads disabled (set by env: DISABLE_AUTOUPDATER). The other update switches are in the environment variables guide.
Updates across several computers#
A laptop, a desktop and a server that runs agents overnight are three installs to keep in step, and the one you forgot is the one that turns down a new model.
Shuriken updates the agent CLIs it installed itself. For Claude Code that means claude update at most once a day, and only after nothing has run on that computer for ten minutes, so an update doesn't land under a running chat. It never runs claude update on an npm or Homebrew install, which belongs to its package manager. A CLI you installed yourself stays yours: its row in Settings › Advanced › Agent CLI updates reads "Installed by you. Updated only when you press Update." The Pin version switch on the same screen keeps a CLI at the version it has. Each computer's card in Settings › Devices says when a CLI is missing, installing or failed to install.
A new computer gets the tools it's missing when you set it up, and a server added from the app installs and checks every agent CLI and the GitHub sign-in as part of setup. To have it done on each machine, download Shuriken.
Sources
- Advanced setup: install, update and release channels (Claude Code docs) (accessed 22 October 2026)
- Troubleshoot installation and login (Claude Code docs) (accessed 22 October 2026)
- Environment variables (Claude Code docs) (accessed 22 October 2026)
Frequently asked questions
How do I check my Claude Code version?
Run claude --version in your terminal. It prints a number such as 2.1.211 (Claude Code). Inside a session, /status shows the version too.
Does Claude Code update automatically?
The native install does: it checks on startup and while running, downloads in the background and switches on your next start. Homebrew, WinGet, apt, dnf and apk installs don't, unless you set CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 for Homebrew or WinGet.
Why is my Homebrew Claude Code behind the latest version?
The claude-code cask follows the stable channel, which is typically about a week behind. Install claude-code@latest for every release as it ships, and run brew update if Homebrew can't find a cask at all.
Should I use npm update -g to update Claude Code?
No. Anthropic's docs say npm update -g respects the version range from your original install and may not move you to the newest release. Use npm install -g @anthropic-ai/claude-code@latest.
What does Auto-update failed · Run claude doctor mean?
A background update didn't install. You can keep working. Run claude update in your shell to finish it or see the real error.