ChatGPT and Codex app cache on Mac: safe to delete?
Quit first: ChatGPT · Codex
Where it is
~/Library/Caches/com.openai.chat~/Library/Caches/com.openai.codex~/Library/Application Support/Codex/Cache~/Library/Application Support/Codex/Code Cache~/Library/Application Support/Codex/GPUCache~/.codex/log~/.codex/.tmp~/.codex/tmp
What it is
OpenAI's ChatGPT Mac app and Codex both keep caches on disk. The Codex desktop app stores Chromium-style web, code and GPU caches in its Application Support folder, both apps use ~/Library/Caches, and the Codex CLI writes logs and temporary files under ~/.codex.
Why it gets so big
Image previews, web assets and compiled code caches accumulate as you use the apps, and Codex logs grow with every agent run. Temporary folders aren't always cleaned up when a run ends abruptly.
Is it safe to delete?
Yes. These are caches, logs and temp files, and the apps rebuild whatever they need. Your ChatGPT conversations are stored in your OpenAI account, and Codex session history lives in a separate sessions folder that this cleanup doesn't touch. Quit ChatGPT and Codex first so neither is writing to these files.
Tip
Don't remove ~/.codex entirely: it also holds your Codex config, sign-in and session history.
See how much space it uses
du -sh "$HOME/Library/Caches/com.openai.chat" "$HOME/Library/Caches/com.openai.codex" "$HOME/Library/Application Support/Codex/Cache" "$HOME/Library/Application Support/Codex/Code Cache" "$HOME/Library/Application Support/Codex/GPUCache" "$HOME/.codex/log" "$HOME/.codex/.tmp" "$HOME/.codex/tmp" 2>/dev/nullDelete it by hand
Run in Terminal. Deleting cannot be undone, so check the paths first.
rm -rf "$HOME/Library/Caches/com.openai.chat"/*
rm -rf "$HOME/Library/Caches/com.openai.codex"/*
rm -rf "$HOME/Library/Application Support/Codex/Cache"/*
rm -rf "$HOME/Library/Application Support/Codex/Code Cache"/*
rm -rf "$HOME/Library/Application Support/Codex/GPUCache"/*
rm -rf "$HOME/.codex/log"/*
rm -rf "$HOME/.codex/.tmp"/*
rm -rf "$HOME/.codex/tmp"/*