Update or uninstall Codex

Update Codex the same way you installed it. Re-run the official installer, run npm install -g @openai/codex again, or run brew upgrade --cask codex. The desktop app updates through its store or, on Linux, through your package manager. To uninstall, use the same tool in reverse, then decide whether to keep or delete your ~/.codex folder.

Update the CLI

Installed withUpdate command
Standalone installer (macOS/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"
npmnpm install -g @openai/codex
Homebrewbrew upgrade --cask codex

Afterwards, open a new terminal and confirm with codex --version.

Update the desktop app

  • Windows: the app is distributed through the Microsoft Store, so Store updates apply. OpenAI documents enterprise update options separately.
  • macOS: follow the update prompts in the app. We haven’t confirmed the exact update mechanism against OpenAI’s docs yet.
  • Ubuntu / Debian: sudo apt update && sudo apt install --only-upgrade chatgpt
  • Fedora: sudo dnf upgrade --refresh chatgpt
  • Arch: updates come with a full system upgrade, sudo pacman -Syu

Uninstall the CLI

Installed withRemove with
npmnpm uninstall -g @openai/codex
Homebrewbrew uninstall --cask codex
Manual binaryDelete the codex file you placed on your PATH
Standalone installerOpenAI’s docs don’t currently describe an uninstall command. Find the binary with which codex or where.exe codex and remove it, then remove any PATH entry the installer added.

Remove your Codex data (optional)

Your settings, cached login, and history are in your Codex home directory, ~/.codex unless you set CODEX_HOME. It can include:

  • config.toml and any AGENTS.md you created
  • auth.json with cached access tokens, if file storage is used. Treat it like a password.
  • sessions/ and archived_sessions/ transcripts

Sign out first with codex logout, then delete the folder only if you’re sure you don’t need it. On Windows, the desktop app uses %USERPROFILE%\.codex.

Questions people ask

How do I know an update is available?

Compare codex --version with the latest release on GitHub, or follow our release tracker.

Will updating delete my settings?

No. Your config.toml, AGENTS.md, and session history live in your Codex home directory (~/.codex by default), separate from the program files.

Sources

We link to the official source for every instruction on this page. If anything here disagrees with them, trust the official source and tell us.