Auto-Updates (Default)
Seamless background updates with zero downtime - recommended for most users
Upgrading Claude Code requires careful planning and execution, especially in team or enterprise environments. This guide provides comprehensive procedures for safe, reliable upgrades with minimal disruption to your workflow.
Auto-Updates (Default)
Seamless background updates with zero downtime - recommended for most users
Manual Updates
Full control over timing and testing - ideal for teams and enterprises
Version Pinning
Lock to specific versions for stability - required in regulated environments
Rollback Ready
Always maintain ability to revert - critical for production environments
Before any upgrade, ensure you’re prepared:
Check Current Version
claude --versionclaude doctor # More detailed diagnostics
Review Release Notes
# Within Claude Code/release-notes
# Or check GitHub# github.com/anthropics/claude-code/releases
Backup Critical Configurations
# Backup your configurationscp -r ~/.claude ~/.claude.backup.$(date +%Y%m%d)cp -r .claude .claude.backup.$(date +%Y%m%d)
Test in Non-Critical Environment
Notify Team Members
# Check for updatesnpm outdated -g @anthropic-ai/claude-code
# Perform upgradenpm update -g @anthropic-ai/claude-code
# Verify upgradeclaude --version
# Sometimes needed for major version jumpsnpm uninstall -g @anthropic-ai/claude-codenpm cache clean --forcenpm install -g @anthropic-ai/claude-code
# Pin to specific versionnpm install -g @anthropic-ai/claude-code@1.0.54
# Verify exact versionnpm list -g @anthropic-ai/claude-code
The local installation method avoids permission issues and provides smoother updates:
# If you haven't migrated yetclaude migrate-installer
# Updates happen automatically or manuallyclaude update
# Check installation locationwhich claude # Should show ~/.claude/local/claude
# From existing installationclaude install
# Or fresh installcurl -fsSL claude.ai/install.sh | bash
When upgrading across breaking changes, follow this pattern:
Identify the Change
arn:aws:bedrock:region::foundation-model/model%2Fversion
arn:aws:bedrock:region::foundation-model/model/version
Update Configuration
# Before upgrade, update environment variablesexport ANTHROPIC_MODEL="arn:aws:bedrock:us-east-1::foundation-model/anthropic.claude-3-opus-20240229-v1:0"# Note: No %2F, use literal /
Test Configuration
# Verify configuration worksclaude doctor
Proceed with Upgrade
claude update
Configuration Format
JSON structure changes, new required fields, deprecated options
API Changes
SDK field renames (e.g., total_cost
→ total_cost_usd
)
Tool Renames
Built-in tools get clearer names (e.g., LSTool
→ LS
)
Command Changes
Slash commands or flags modified or deprecated
Development Environment
Staging Environment
Production Rollout
Post-Upgrade Review
# Disable auto-updates company-wideexport DISABLE_AUTOUPDATER=1
# Version pinning in package.json{ "devDependencies": { "@anthropic-ai/claude-code": "1.0.54" }}
# Automated deployment script#!/bin/bashAPPROVED_VERSION="1.0.54"CURRENT_VERSION=$(claude --version | grep -oE '[0-9]+\.[0-9]+\.[0-9]+')
if [ "$CURRENT_VERSION" != "$APPROVED_VERSION" ]; then npm install -g @anthropic-ai/claude-code@$APPROVED_VERSIONfi
When an upgrade causes issues, quick rollback is essential:
# Rollback to previous versionnpm install -g @anthropic-ai/claude-code@1.0.53
# Restore configuration backuprm -rf ~/.claudemv ~/.claude.backup.20250716 ~/.claude
# Local installations maintain version historycd ~/.claude/versions
# List available versionsls -la
# Switch to previous versionln -sf 1.0.53 current
After any upgrade, verify critical functionality:
Basic Functionality
# Check version and diagnosticsclaude --versionclaude doctor
# Test basic interactionclaude "Hello, are you working correctly?"
Configuration Integrity
# Verify settings preservedclaude config get autoUpdates --globalclaude config get model --global
# Check custom commandsls .claude/commands/
Tool Functionality
# Test file operationsclaude "List files in current directory"
# Test MCP servers/mcp list
Performance Check
# Diagnose configuration issuesclaude doctor
# Reset to defaults if neededmv ~/.claude/config.json ~/.claude/config.json.backupclaude # Will recreate with defaults
# NPM permission issuessudo npm install -g @anthropic-ai/claude-code # Not recommended
# Better solution: migrate to localclaude migrate-installer
# Check for multiple installationswhich -a claudetype -a claude
# Remove duplicatesnpm uninstall -g @anthropic-ai/claude-code# Then reinstall
After major upgrades, MCP servers may need updates:
# Check MCP server status/mcp list
# Update MCP configurations if neededclaude mcp update <server-name>
Always Backup
Configuration and custom commands before any upgrade
Test First
In isolated environment before team-wide rollout
Read Release Notes
Understand changes and potential impacts
Coordinate Teams
Synchronize upgrades to avoid version mismatches
Monitor Post-Upgrade
Watch for performance changes or new issues
Document Everything
Keep upgrade logs for future reference
If critical issues arise during upgrade: