Update Claude Code, Codex CLI and Gemini CLI

Check which version you have, then update Claude Code, Codex CLI or Gemini CLI with the command that matches how you installed it. Includes common fixes.

Checked against official docs on 15 Oct 2026

On this page

New versions of the three assistants come out often. They bring fixes, new commands and support for new models. This guide shows how to check which version you have and how to update each tool.

Type every command in this guide in the terminal (Terminal on a Mac, PowerShell on Windows), not inside a chat with the assistant. You need the assistant installed already. If it is not, read Install Claude Code, Install Codex CLI or Install Gemini CLI first.

The right update command depends on how you installed the tool. If you do not remember, look at the install guide you used and pick the same method below.

1. Check which version you have

Claude Code:

claude --version

Codex CLI:

codex --version

Gemini CLI (gemini -v also works):

gemini --version

Each command prints a version number. Write it down, so you can compare it after the update.

2. Update Claude Code

Official installer (the native install): Claude Code updates itself. It checks for updates when it starts and while it runs, and downloads them in the background. A new version takes effect the next time you start Claude Code. To update straight away, run:

claude update

It reports Successfully updated from <old version> to version <new version>. If you already have the newest version, it reports Claude Code is up to date (<version>).

Homebrew on a Mac: Homebrew installs do not update themselves. Run:

brew upgrade claude-code

If you installed the claude-code@latest cask, run this instead:

brew upgrade claude-code@latest

The claude-code cask follows the stable channel, which is usually about a week behind. The claude-code@latest cask gets new versions as soon as they come out.

WinGet on Windows: WinGet installs do not update themselves either. Run:

powershell
winget upgrade Anthropic.ClaudeCode

To see the result of the last automatic update, run:

claude doctor

claude doctor checks your install and settings and prints any warnings with suggested fixes. It does not start a session.

3. Update Codex CLI

Codex has its own update command. It works when the version you installed supports self-update:

codex update

If it does not, run the update command for your install method. OpenAI lists these on the Codex CLI page.

Mac or Linux, standalone installer: the update command is the same as the install command:

curl -fsSL https://chatgpt.com/codex/install.sh | sh

Windows, standalone installer: open a new PowerShell window and run:

powershell
powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 | iex"

npm: the update command is the same as the install command:

npm install -g @openai/codex

Homebrew:

brew upgrade --cask codex

4. Update Gemini CLI

Gemini CLI has an update command:

gemini update

If you installed with npm, you can also ask npm for the latest version:

npm install -g @google/gemini-cli@latest

Extensions (add-ons for Gemini CLI) update separately. To update all of them:

gemini extensions update --all

5. Restart and check

Close the assistant if it is running. Open a new terminal window and run the version command from step 1 again. You see the new number.

If you see an error

  • Claude Code says Claude is up to date!: this message comes from installs made with Homebrew, WinGet or apk (a Linux package manager). These installs do not update themselves. Use the Homebrew or WinGet command in step 2, or your Linux package manager.
  • Claude Code says Claude Code is up to date (<version>), but you expected a newer version: your update channel may be stable, which gets new versions later than latest. Type /config in a Claude Code session and look at Auto-update channel.
  • Claude Code does not update after you replaced ~/.local/bin/claude with your own link or script: claude doctor reports this custom launcher. Remove that file and run claude update. Claude Code then manages the launcher again.
  • An npm install of Claude Code cannot update itself: the npm folder is not writable. Claude Code shows a one-time notice when it starts, and claude doctor lists the fixes.
  • codex update does not update your copy: not every Codex install supports self-update. Use the command for your install method in step 3.
  • The version number did not change: close every terminal window and open a new one. An old window can still use the old copy.

Sources