Skip to content

How to uninstall OpenAI Codex on a Mac: the CLI, the app, and 1.2 GB of leftovers

The Codex CLI and the Codex app leave data in two different places. What each one keeps, measured: 1.0 GB in ~/.codex and 165 MB in Application Support.

5 min read

How do I uninstall the Codex CLI on a Mac?

npm uninstall -g @openai/codex
# or, if you used Homebrew
brew uninstall codex

Run codex logout first if you want the stored sign in removed cleanly. After uninstalling, which codex should print nothing; on our Mac the command was a link at /usr/local/bin/codex into the global npm folder.

What does Codex leave in ~/.codex?

FolderSize hereWhat it is
packages310 MBDownloaded runtime packages
plugins297 MBInstalled plugins
.tmp124 MBWorking files, about 6,000 of them
sessions115 MBSaved conversations
logs_2.sqlite66 MBLogs
computer-use, generated_images, cache99 MBTool data and images

The total was 1.0 GB. sessions is the part worth keeping if you might come back: it holds past conversations. The rest downloads again.

What does the Codex app leave behind?

On our Mac there was no Codex app in Applications, yet ~/Library/Application Support/Codex held 165 MB, with Caches/Codex, Logs/com.openai.codex and HTTPStorages/com.openai.codex beside it. The app had been removed and its data had not. Move every folder named Codex or com.openai.codex in ~/Library to the Trash.

Find what is left in one look

Free Mac shows ~/.codex and the app's Library folders on one map and moves what you pick to the Trash. Keeping Codex and only want space back? See Codex CLI taking up space and the wider AI coding tools guide.

Related: uninstall GitHub Copilot CLI and uninstall Windsurf.

Common questions

Does uninstalling Codex delete my conversations?

Not by itself. Saved sessions live in ~/.codex/sessions and stay until you delete that folder.

Is it safe to delete the .codex folder?

Yes, once the CLI is uninstalled. It holds downloaded packages, plugins, logs and sessions. Copy sessions somewhere first if you want your history.

Where does the Codex app store data on a Mac?

In ~/Library/Application Support/Codex, with caches, logs and web storage under com.openai.codex. On our Mac it was 165 MB and outlived the app.

Read next