[Claude Code] How to Update Claude Code Installed via Homebrew

2026-03-19 hit count image

Claude Code installed via Homebrew does not auto-update. Learn how to manually update, set up automatic updates, and switch to native installation.

generative_ai

Overview

If you installed Claude Code via Homebrew (brew), Homebrew cask packages do not auto-update by default. You need to manually run update commands to get new features and security patches.

In this post, we cover manual updates, automatic update configuration, and how to switch to native installation.

For installation and basic usage of Claude Code, see Claude Code Basic Knowledge and How to Use.

Check Current Version

Check your currently installed version before updating.

claude --version

To check if updates are available, use brew outdated.

brew outdated --cask

If claude-code appears in the list, a new version is available.

Manual Update

Update Homebrew’s formula information, then upgrade Claude Code.

brew update && brew upgrade --cask claude-code
  • brew update: Updates Homebrew itself and its formula/cask definitions.
  • brew upgrade --cask claude-code: Upgrades the Claude Code cask to the latest version.

Running just brew upgrade claude-code also works in modern Homebrew as it auto-detects casks, but using the --cask flag is more explicit.

Auto-Update Setup

If manual updates are too cumbersome, you can use homebrew-autoupdate to automatically update packages in the background.

Install homebrew-autoupdate

brew tap homebrew/autoupdate

Start Auto-Update

brew autoupdate start --upgrade --cleanup
  • start: Schedules periodic brew update using macOS launchd.
  • --upgrade: Automatically runs brew upgrade after brew update to upgrade packages.
  • --cleanup: Automatically cleans up old version caches after upgrading.

The default interval is 24 hours (86400 seconds). To change the interval, specify it in seconds.

# Auto-update every 12 hours
brew autoupdate start 43200 --upgrade --cleanup

Manage Auto-Update Settings

# Check current auto-update status
brew autoupdate status

# Stop auto-update
brew autoupdate stop

# Delete auto-update (remove schedule)
brew autoupdate delete

This setting applies to all packages installed via Homebrew, not just Claude Code. To exclude specific packages from updates, use brew pin <package>.

Switch to Native Installation

Using the native install script instead of Homebrew, Claude Code automatically checks for updates every time it runs. Since native auto-update is more reliable, switching to native installation is recommended if managing updates manually feels cumbersome.

1. Uninstall the Homebrew version

brew uninstall --cask claude-code

2. Run the native install script

curl -fsSL https://claude.ai/install.sh | bash

3. Verify installation

claude --version

When switching from Homebrew to native installation, you can use the /migrate-installer command within Claude Code to migrate your settings.

claude
# Inside Claude Code
> /migrate-installer

Troubleshooting

Auto-update failed Message

If you see an Auto-update failed message when launching Claude Code, it is usually a file system permission issue.

# Fix Homebrew directory permissions
sudo chown -R $(whoami) $(brew --prefix)/*

# Or reinstall Homebrew and Claude Code
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew install --cask claude-code

If the issue persists, switching to native installation is recommended.

Homebrew Cache Issues

If the upgrade fails, clean the cache and try again.

brew cleanup
brew update
brew upgrade --cask claude-code

Conclusion

We’ve covered how to update Claude Code installed via Homebrew — manual updates, auto-update configuration, and switching to native installation. Choose the method that best suits your environment to always use the latest version of Claude Code.

Was my blog helpful? Please leave a comment at the bottom. it will be a great help to me!

App promotion

You can use the applications that are created by this blog writer Deku.
Deku created the applications with Flutter.

If you have interested, please try to download them for free.



SHARE
Twitter Facebook RSS