The fastest way to update Claude Code is one command:
claude update
(claude upgrade is an alias; the CLI describes it as "Check for updates and install if available.") Whether you actually need to run it depends on how you installed.
Which Install Do You Have?
Run claude doctor. On a native install it reports Running: native (2.1.x), Auto-updates: enabled, Auto-update channel: latest and Last update attempt: success.
| Install method | Auto-updates? | How to update |
|---|---|---|
| Native installer (recommended) | Yes, in the background | claude update to apply immediately |
| Homebrew | No | brew upgrade claude-code or brew upgrade claude-code@latest |
| WinGet | No | winget upgrade Anthropic.ClaudeCode |
| npm | Yes, if the global directory is writable | npm install -g @anthropic-ai/claude-code@latest |
| apt / dnf / apk | No | sudo apt update && sudo apt upgrade claude-code, sudo dnf upgrade claude-code, apk update && apk upgrade claude-code |
For native installs, updates download in the background and take effect the next time you start Claude Code, so a running session keeps its old version until you restart it.
Check Your Version
claude --version
This prints a version number like 2.1.x (Claude Code). If you see command not found, see claude command not found.
Update by Install Method
Native installer
claude update
Anthropic's docs say a successful update reports Successfully updated from <old version> to version <new version>, and an up-to-date install reports Claude Code is up to date (<version>). On macOS and Linux the launcher is ~/.local/bin/claude, a symlink into ~/.local/share/claude/versions/. If you replaced that launcher with your own script, updates still install new versions but your launcher decides which one runs; delete ~/.local/bin/claude and run claude update to let Claude Code manage it again.
Homebrew
brew upgrade claude-code # stable cask
brew upgrade claude-code@latest # latest cask
brew cleanup # reclaim old versions
claude-code tracks the stable channel (about a week behind). claude-code@latest tracks the latest channel.
WinGet
winget upgrade Anthropic.ClaudeCode
Close all Claude Code sessions first: Windows locks the running executable and the upgrade may fail. If it says no newer version is available but Claude Code announced one, the package may not have propagated yet; try again later.
npm
npm install -g @anthropic-ai/claude-code@latest
Do not use sudo. If the global directory is not writable, see permission errors.
Let Homebrew or WinGet update themselves
Set the CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE environment variable to 1 and Claude Code runs the package-manager upgrade in the background when a new version ships, then prompts you to restart. It targets only the Claude Code package.
Choose a Channel or Pin a Version
In settings.json:
{
"autoUpdatesChannel": "stable",
"minimumVersion": "2.1.100"
}
autoUpdatesChannel:"latest"(default) or"stable".minimumVersion: a floor; background updates andclaude updatewill not install anything below it, so switching tostabledoes not downgrade you.
To install an exact version with the native installer:
curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89
On Windows PowerShell: & ([scriptblock]::Create((irm https://claude.ai/install.ps1))) 2.1.89. Confirm with claude --version.
Stop Auto-Updates
{
"env": {
"DISABLE_AUTOUPDATER": "1"
}
}
Run claude doctor afterward; the Auto-updates line should read disabled (set by env: DISABLE_AUTOUPDATER). This only stops the background check. claude update and claude install still work. Set DISABLE_UPDATES to block every update path.
When the Update Fails
- Nothing happens or "up to date" after a release. Your channel may be
stable, which lags by about a week. - Permission errors on npm. See Claude Code permission errors.
- Still the old version after updating. Restart the session, and check you do not have two installs:
which -a claude. - Installation is broken. See installation errors, or uninstall and reinstall.