← Blog

How-to4 min read

How to update Claude Code, pin a version, or uninstall it

Run claude update, or your package manager's command. How to check the version, stay on stable, stop auto-updates, go back a version, and uninstall Claude Code.

Mirasim's agent and model picker open in a sessionMirasim's agent and model picker open in a session

The short answer

Run claude update in your shell. If you installed Claude Code with Anthropic's script, it also updates itself in the background, and the new version takes effect the next time you start it. Homebrew, WinGet, apt, dnf and apk installs don't update by themselves by default; use the command for yours.

Installed withUpdateUpdates itself?
Install script (native)claude updateYes
npmnpm install -g @anthropic-ai/claude-code@latestYes, if the global folder is writable without sudo
Homebrewbrew upgrade claude-code (or claude-code@latest)No, unless you opt in
WinGetwinget upgrade Anthropic.ClaudeCodeNo, unless you opt in
aptsudo apt update && sudo apt upgrade claude-codeNo
dnfsudo dnf upgrade claude-codeNo
apkapk update && apk upgrade claude-codeNo
Claude Desktop (Code tab)Check for Updates, in the Claude menu on macOS or Help on WindowsYes, its own copy; on Linux, through apt

With npm, avoid npm update -g: it follows the version range from your first install and may not reach the newest release. To opt in on Homebrew or WinGet, set the CLAUDE_CODE_PACKAGE_MANAGER_AUTO_UPDATE environment variable to 1.

Check your version

bash
claude --version   # the installed version
claude doctor      # install health, and how the last update attempt went
which -a claude    # on macOS and Linux: is there more than one copy?

On Windows, use where.exe claude for the last one. Two copies is the usual reason an update seems to do nothing.

Stay on stable, pin a version, or go back

Latest or stable
In /config, open Auto-update channel. Latest is the default; stable is typically about a week old and skips releases with major regressions.
Don't go below a version
Set minimumVersion in your settings file. Background updates and claude update won't install anything older.
Stop background updates
Set DISABLE_AUTOUPDATER to "1" under env in settings. claude update still works. DISABLE_UPDATES blocks both.
Install a specific version
Give the install script a version number: curl -fsSL https://claude.ai/install.sh | bash -s 2.1.89 on macOS, Linux and WSL.
For a whole team
Managed settings can require a version range with requiredMinimumVersion and requiredMaximumVersion; outside it, Claude Code refuses to start.

When an update goes wrong

“Auto-update failed · Run claude doctor”
The background update didn't install; you can keep working. Run claude update in your shell to finish it or see the reason.
claude not found right after an update on Windows
Look in %USERPROFILE%\.local\bin for a file whose name starts with claude.exe.old. and rename the newest one back to claude.exe. If there is none, run the install script again.
The update notice stays, but there's nothing newer
Package managers can lag behind. Anthropic lists this as a known issue; wait and try again later.
A new model isn't in the list
A newly launched model can need a newer version than stable has. Switch to latest to use it now.

Uninstall Claude Code

Installed withUninstall
Script, on macOS, Linux, WSLrm -f "$HOME/.local/bin/claude", then rm -rf "$HOME/.local/share/claude"
Script, on WindowsIn PowerShell, remove $env:USERPROFILE\.local\bin\claude.exe and the folder $env:USERPROFILE\.local\share\claude
npmnpm uninstall -g @anthropic-ai/claude-code
Homebrewbrew uninstall --cask claude-code (or claude-code@latest)
WinGetwinget uninstall Anthropic.ClaudeCode
apt, dnf, apksudo apt remove claude-code, sudo dnf remove claude-code or apk del claude-code

If claude still runs afterwards, you have a second install or an old shell alias. which -a claude shows where it is.

Keep every agent up to date from one place

If you run several coding agents, Mirasim's Settings › Agents lists each one's installed version next to the latest, with an Update button that runs that agent's own updater. An Auto-update switch, off by default, installs new versions once the agent is idle, so a running session isn't cut off. Mirasim runs the Claude Code you installed and isn't an Anthropic app.

Questions

Does Claude Code update automatically?
Script installs do, and npm installs when the global folder is writable. Others don't by default.
Do I need to restart after an update?
Yes. A running session stays on the version it started with; the new one is used the next time you start claude.
Does updating the CLI update the desktop app?
No. The Code tab runs its own copy, updated with the desktop app.

Sources

Commands were checked on November 24, 2026 against Anthropic's documentation: code.claude.com/docs/en/setup, /troubleshoot-install and /desktop. Check those pages for the latest.

Keep reading