Use the update command to check for and install updates for Claude Code. The command automatically detects your installation method (native, npm-local, npm-global, or package manager) and attempts to update it using the appropriate mechanism.
Update Channels
By default, it checks the latest channel, but it respects the autoUpdatesChannel setting in your configuration (e.g., stable).
Manual Update Fallbacks
If the automatic update fails due to permissions or errors, the CLI may suggest manual commands:
- For local npm installations:
cd ~/.claude/local && npm update @anthropic-ai/claude-code - For global npm installations: Run with
sudo or consider switching to a native installation using claude install.
Package Manager Updates
If Claude Code was installed via a system package manager, the update command will instruct you to use that manager instead of performing the update itself:
- Homebrew:
brew upgrade claude-code - Winget:
winget upgrade Anthropic.ClaudeCode - APK:
apk upgrade claude-code - Other (pacman, deb, rpm): Use your system's specific package manager (e.g.,
apt, dnf, pacman).