Use the update command to check for and install the latest version of Claude Code. The update process automatically detects your installation method (e.g., npm-local, npm-global, or native) and uses the appropriate mechanism to perform the update.
Update Channels:
Updates are checked against the channel specified in your initial settings, which defaults to latest.
Common Update Scenarios:
Package Manager Managed: If Claude was installed via a system package manager, the tool will provide the specific command you need to run manually.
- Homebrew:
brew upgrade claude-code - Winget:
winget upgrade Anthropic.ClaudeCode - APK:
apk upgrade claude-code - Other (pacman, deb, rpm): Use your system's package manager directly.
Native Installation: If using a native installation, the tool attempts to update using the native updater. If an update is successful, the completion cache is automatically regenerated.
NPM (Local or Global): If installed via npm, the tool will attempt to run npm update or npm install -g automatically.
Troubleshooting Update Failures:
- Insufficient Permissions: If you encounter a
no_permissions error:- For local installs: Try
cd ~/.claude/local && npm update <package-url> - For global installs: Try running with
sudo or consider switching to a native installation using claude install.
- Installation in Progress: If another instance is performing an update, wait and try again later.
- Network/Registry Issues: If the tool cannot reach the npm registry, check your internet connection, corporate proxy/firewall settings, or run with the
--debug flag for more details.