# 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.

Source: https://shuriken.sh/guides/update-claude-code

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.

By Shuriken Updated 27 October 2026 5 min read

**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](https://code.claude.com/docs/en/setup) and [troubleshooting](https://code.claude.com/docs/en/troubleshoot-install) pages as they read on 22 October 2026.

## Check your Claude Code version #

bash
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:

bash
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 -g keeps you inside the version range of your original install. Never use sudo npm install -g.
- Homebrew keeps old versions on disk; brew cleanup removes them.
- CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE=1 lets 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:

bash
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:

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).

Shuriken runs your coding agents on your own computers and keeps them going when an account hits its limit.

[Download](https://shuriken.sh/download)

## 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](https://shuriken.sh/guides/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](https://shuriken.sh/guides/claude-code-keeps-asking-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=1 stops background updates. claude update still works when you choose.
- DISABLE_UPDATES=1 blocks 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](https://shuriken.sh/guides/claude-code-environment-variables).

## Updates across several computers #

A laptop, a desktop and a [server that runs agents overnight](https://shuriken.sh/guides/claude-code-on-an-always-on-machine) 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](https://shuriken.sh/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](https://shuriken.sh/download).

Share

[X](https://x.com/intent/post?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fupdate-claude-code&text=How%20to%20update%20Claude%20Code%20(and%20fix%20a%20failed%20update))[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fupdate-claude-code)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Fshuriken.sh%2Fguides%2Fupdate-claude-code&t=How%20to%20update%20Claude%20Code%20(and%20fix%20a%20failed%20update))[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fshuriken.sh%2Fguides%2Fupdate-claude-code&title=How%20to%20update%20Claude%20Code%20(and%20fix%20a%20failed%20update))[E-mail](mailto:?subject=How%20to%20update%20Claude%20Code%20(and%20fix%20a%20failed%20update)&body=https%3A%2F%2Fshuriken.sh%2Fguides%2Fupdate-claude-code)

## Sources

- [Advanced setup: install, update and release channels (Claude Code docs)](https://code.claude.com/docs/en/setup) (accessed 22 October 2026)
- [Troubleshoot installation and login (Claude Code docs)](https://code.claude.com/docs/en/troubleshoot-install) (accessed 22 October 2026)
- [Environment variables (Claude Code docs)](https://code.claude.com/docs/en/env-vars) (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.

Shuriken

The harness for your coding agents.

Run Claude Code, Codex and Gemini CLI on your own computers, move chats to your next account at a limit, and follow every chat from any device.

[Download](https://shuriken.sh/download)

[Other platforms](https://shuriken.sh/download#main)

## Keep reading

- [Run a chat on another computer and keep going: Update 27 Oct 2026 4 min read Move a coding agent chat to another of your computers or a server. It stays the same chat, with its history and uncommitted work, and runs there.](https://shuriken.sh/blog/run-chat-on-another-computer)
- [How to change the model in Claude Code: Guide 27 Oct 2026 3 min read Change the model in Claude Code with /model, claude --model, an environment variable or settings.json. /model wins; Enter in its picker sets your default.](https://shuriken.sh/guides/change-model-in-claude-code)
- [Claude Code API Error 400 on tool_use: what to do: Guide 27 Oct 2026 4 min read A Claude Code API Error 400 about tool use means the saved history has a tool call out of step with its result. Update, then rewind past the broken turn.](https://shuriken.sh/guides/claude-code-api-error-400-tool-use)
- [Claude Code custom slash commands: make your own: Guide 27 Oct 2026 3 min read Make your own Claude Code slash commands: one Markdown file in .claude/commands or a skill, with arguments, shell output and allowed tools. With examples.](https://shuriken.sh/guides/claude-code-custom-slash-commands)
- [Claude Code thinking and effort levels, explained: Guide 27 Oct 2026 4 min read Claude Code's effort levels, low to max, set how much Claude thinks before it acts. What each level is for, the defaults, ultrathink, and how to set it.](https://shuriken.sh/guides/claude-code-effort-levels)
- [Claude Code chat history deleted? Set cleanupPeriodDays: Guide 27 Oct 2026 5 min read Claude Code deletes session transcripts after 30 days by default. Raise cleanupPeriodDays in settings.json to keep them, and back up what you can't lose.](https://shuriken.sh/guides/claude-code-history-deleted-after-30-days)
- [Claude Code hooks not working? Why they don't fire: Guide 27 Oct 2026 6 min read A Claude Code hook that never fires is either not loaded (missing from /hooks) or loaded with a matcher that matches nothing. The causes and their fixes.](https://shuriken.sh/guides/claude-code-hooks-not-working)

## Free tools

- [Claude limit reset tracker](https://shuriken.sh/tools/limit-resets/claude)
- [Codex limit reset tracker](https://shuriken.sh/tools/limit-resets/codex)
