Home / Guides / How to remove ChatGPT and Claude Code leftovers from Mac
How to remove ChatGPT and Claude Code leftovers from Mac
Before you start
The commands below are provided as-is, without warranty of any kind. Deletion is permanent: rm does not use the Trash and there is no undo, so make a backup first (for example with Time Machine). Paths vary by app version and how you installed it. Use at your own risk; Yogi Software Works is not liable for data loss or other damage resulting from these commands. See our Terms.
Uninstalling an AI app usually leaves files behind: settings, caches, preferences and, for command-line tools, config folders that may hold login data. This guide covers two things: the ChatGPT desktop app (/Applications/ChatGPT.app) and the Claude Code command-line tool. Every path below is a location that AiKiller's own detection rules check for these tools; we did not add paths from other sources.
The Claude desktop app is not covered. AiKiller has no detection rule for it, so we list no paths for it. Its file locations may vary by version; check before deleting anything.
Deletion is permanent. Both rm and AiKiller delete items directly; neither moves them to the Trash. We did not test the commands in this guide on every macOS or app version, so treat the lists as a starting point and review each path yourself.
Step 0: Back up and check what you would lose
Run a Time Machine backup, or copy the folders you may want to keep. Some locations below hold login or credential data (see the notes per tool). Removing them typically means you will need to sign in again if you reinstall.
Part 1: ChatGPT desktop app
Quit it, then see what exists
osascript -e 'quit app "ChatGPT"'
ls -d /Applications/ChatGPT.app \
"$HOME/Library/Application Support/com.openai.chat" \
"$HOME/Library/Caches/com.openai.chat" \
"$HOME/Library/Preferences/com.openai.chat.plist" 2>/dev/null
Paths that are not printed do not exist on your Mac and can be skipped.
Remove the items that were printed
rm -rf /Applications/ChatGPT.app
rm -rf "$HOME/Library/Application Support/com.openai.chat"
rm -rf "$HOME/Library/Caches/com.openai.chat"
rm -f "$HOME/Library/Preferences/com.openai.chat.plist"
AiKiller treats ~/Library/Application Support/com.openai.chat as a credential location, so it is the one most likely to hold sign-in data. The contents can differ by version.
Part 2: Claude Code command-line tool
Find the binary
Claude Code is typically installed as a claude binary. AiKiller checks these locations:
ls -d /usr/local/bin/claude /opt/homebrew/bin/claude \
~/.local/bin/claude ~/.npm-global/bin/claude 2>/dev/null
Remove the package or binary
If you installed it with npm, AiKiller runs npm uninstall -g @anthropic-ai/claude-code for this tool, and you can do the same yourself:
npm uninstall -g @anthropic-ai/claude-code
If a binary from the list above is still present afterwards (for example from another install method), remove only the paths that were printed:
rm -f /usr/local/bin/claude /opt/homebrew/bin/claude ~/.local/bin/claude ~/.npm-global/bin/claude
Remove config and data folders
These are the data locations AiKiller checks. ~/.config/claude-code and ~/.claude.json are treated as credential locations. ~/.claude/ is a data folder that may contain your settings and history; we have not documented its contents, so look inside before deleting it.
du -sh ~/.claude ~/.config/claude-code ~/.claude.json 2>/dev/null
rm -rf ~/.config/claude-code ~/.claude
rm -f ~/.claude.json
What this guide does not cover
To check how much disk space AI tools use overall, see Free up disk space from AI tools on Mac. We did not document launch agents, login items or log file locations for either tool, so none are listed and we are not claiming they do not exist. If launch at login is enabled, you can turn it off under System Settings → General → Login Items. Other files may also exist depending on version and install method.
Or scan first with AiKiller (free)
AiKiller is one option. Scan Mode is read-only: it lists each item with its path and size, and you review every item. Nothing is deleted until you switch to Clean Mode and type a confirmation code. A credentials-preserving option is on by default; it is designed to keep credential locations out of the deletion, and you can review this before confirming. Like the commands above, deletion is permanent and does not use the Trash.
Download AiKiller Buy me a coffeeFAQ
Does deleting these files use the Trash?
No. rm does not use the Trash, and neither does AiKiller. Deleted items are permanent, so make a backup (for example with Time Machine) before you start.
Does this guide cover the Claude desktop app?
No. The locations in this guide come from the detection rules in AiKiller for the ChatGPT desktop app and the Claude Code command-line tool. AiKiller does not have a rule for the Claude desktop app, so we list no paths for it. Its locations may vary by version; check before deleting anything.
Will removing these locations log me out or delete my settings?
Typically, yes for the items named in this guide: some of the locations hold login or credential data, and ~/.claude/ may hold your settings and history. Back up anything you want to keep, and expect to sign in again if you reinstall.