Update the CLI
| Installed with | Update 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" |
| npm | npm install -g @openai/codex |
| Homebrew | brew 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 with | Remove with |
|---|---|
| npm | npm uninstall -g @openai/codex |
| Homebrew | brew uninstall --cask codex |
| Manual binary | Delete the codex file you placed on your PATH |
| Standalone installer | OpenAI’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.tomland anyAGENTS.mdyou createdauth.jsonwith cached access tokens, if file storage is used. Treat it like a password.sessions/andarchived_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.