# Codex how to update: commands for the CLI and the app

> Run the same command you used to install Codex. Homebrew uses brew upgrade, and the desktop app updates itself on macOS and Windows.

URL: https://claudegpt.si/news/codex-how-to-update  
Published: 2026-10-29T06:51:03.199Z  
Author: ClaudeGPT Si Newsroom  
Section: AI Tools  
Topics: OpenAI, Codex, Codex CLI, How to  
Publisher: ClaudeGPT Si

## Key takeaways

- The Codex CLI updates with the same command you used to install it, except Homebrew, which uses brew upgrade --cask codex.
- The Codex app lives inside the ChatGPT desktop app, which OpenAI says normally checks for and installs updates on its own on macOS and Windows.
- As of October 29, 2026, the latest stable Codex release on GitHub is 0.165.0, published on October 27.

To update Codex, run the same command you used to install it. For the standalone installer on macOS and Linux, that is `curl -fsSL https://chatgpt.com/codex/install.sh | sh`. For npm it is `npm install -g @openai/codex`, and for Homebrew it is `brew upgrade --cask codex`. This guide covers the Codex CLI and the Codex desktop app, based on [OpenAI's Codex docs](https://learn.chatgpt.com/docs/codex/cli) and the [Codex repository on GitHub](https://github.com/openai/codex), as read on October 29, 2026.

The CLI and the app update in different ways, so find which one you have first. If you type `codex` in a terminal, you have the CLI. If you use Codex from the ChatGPT desktop app, you have the app.

## How to update the Codex CLI

Pick the line that matches how you installed it. OpenAI's docs give one update command per install method.

| How you installed it | Update command |
| --- | --- |
| Standalone installer, macOS or Linux | `curl -fsSL https://chatgpt.com/codex/install.sh \| sh` |
| Standalone installer, Windows | `powershell -ExecutionPolicy ByPass -c "irm https://chatgpt.com/codex/install.ps1 \| iex"` |
| npm | `npm install -g @openai/codex` |
| Homebrew | `brew upgrade --cask codex` |

The docs say the installer commands are the same for install and update, and the same goes for npm. Homebrew is the exception: `brew install --cask codex` installs it, and `brew upgrade --cask codex` updates it. The docs say to run the Windows command from a new PowerShell window.

### Update with the standalone installer

On macOS or Linux, run this in a terminal:

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

On Windows, open a new PowerShell window and run:

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

By default the installers download from `https://releases.openai.com/codex` and fall back to GitHub Releases if that download fails. To force GitHub Releases, set `CODEX_INSTALLER_USE_RELEASES_OPENAI_COM` to `false`, as the README describes:

```bash
curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_INSTALLER_USE_RELEASES_OPENAI_COM=false sh
```

### Update with npm

```bash
npm install -g @openai/codex
```

### Update with Homebrew

```bash
brew upgrade --cask codex
```

### Update from a GitHub release

You can also download a binary by hand from the [latest GitHub release](https://github.com/openai/codex/releases/latest). Each archive holds one file with the platform in its name, such as `codex-x86_64-unknown-linux-musl`, and the README suggests renaming it to `codex` after you extract it. On Apple Silicon Macs the archive is `codex-aarch64-apple-darwin.tar.gz`.

## How to check which version of Codex you have

The docs we read do not name a command for printing the CLI version, and we did not test one. What you can do is compare against the newest release. As of October 29, 2026, the latest stable release on GitHub is 0.165.0 (tag `rust-v0.165.0`), published on October 27. A 0.166.0 alpha is also listed, but alphas are pre-releases and not what the update commands install.

The `/status` slash command shows the current session configuration, but the docs do not say that it prints the version. If you need to be sure, run the update command for your install method. Running it again when you are already current is the documented way to update, and it changes nothing you configured.

## How to update the Codex app

OpenAI's docs do not describe a manual update step for the Codex app. OpenAI's [Codex app page](https://learn.chatgpt.com/docs/app) tells you to download ChatGPT for macOS, Windows or Linux and sign in, so updating the app means updating the ChatGPT desktop app.

On macOS and Windows, OpenAI's enterprise documentation says the app "normally checks for and installs updates on its own," and that the updater is on by default. A **Check for Updates** menu option exists, but the docs warn it can stay visible even when an administrator has blocked in-app updates. If you use a work computer, an administrator may manage updates for you. In that case **Settings** > **General** shows **In-app updates** as **Managed**.

On Linux, update ChatGPT through your package manager, as the [Linux app page](https://learn.chatgpt.com/docs/linux/linux-app) describes:

| Distribution | Command |
| --- | --- |
| Ubuntu or Debian | `sudo apt update` then `sudo apt install --only-upgrade chatgpt` |
| Fedora | `sudo dnf upgrade --refresh chatgpt` |
| Arch Linux | `sudo pacman -Syu` |

## Common problems

- The command runs but the old version stays. You may have installed Codex with a different method than the one you just used, and the old copy comes first on your path. Update with the method you originally used, or remove the older install.
- The Windows command fails. The docs say to run it from a new PowerShell window.
- The installer cannot download. Set `CODEX_INSTALLER_USE_RELEASES_OPENAI_COM` to `false` to pull from GitHub Releases instead.
- You are not sure how you installed it. Check each package manager for a Codex entry, then use the matching command in the table above.

## Where to go next

Once Codex is current, see what your plan includes in [is Codex free](https://claudegpt.si/news/is-codex-free) and [how to check Codex token usage](https://claudegpt.si/news/codex-check-token-usage). For how it compares with Anthropic's tool, read [Claude Code vs Codex](https://claudegpt.si/news/claude-code-vs-codex). Release notes for each version are on the [Codex releases page](https://github.com/openai/codex/releases).

## Frequently asked questions

### How do I update Codex CLI with npm?

Run npm install -g @openai/codex. OpenAI's docs give the same command for installing and updating.

### How do I update Codex with Homebrew?

Run brew upgrade --cask codex. The install command is brew install --cask codex.

### Does the Codex app update automatically?

OpenAI says the ChatGPT desktop app normally checks for and installs updates on its own on macOS and Windows. Administrators can turn that off, in which case Settings > General shows In-app updates as Managed.

### How do I update Codex on Linux?

For the CLI, use the standalone installer, npm or Homebrew command. For the ChatGPT desktop app, use sudo apt install --only-upgrade chatgpt on Ubuntu or Debian, sudo dnf upgrade --refresh chatgpt on Fedora, or sudo pacman -Syu on Arch.

## Sources

- [Codex CLI](https://learn.chatgpt.com/docs/codex/cli), OpenAI
- [openai/codex README](https://github.com/openai/codex), GitHub
- [Codex releases](https://github.com/openai/codex/releases), GitHub
- [Manage app updates](https://learn.chatgpt.com/docs/enterprise/manage-app-updates), OpenAI
- [ChatGPT desktop app for Linux](https://learn.chatgpt.com/docs/linux/linux-app), OpenAI
