Claude Code ate 472 GB on one Mac. What's in ~/.claude and what's safe to delete.
30 September 2026
Upper ends are from bug reports and other developers' write-ups, not typical Macs. Most people find a few GB; a few find hundreds. The commands below give your own numbers.
In issue #18869 on the Claude Code repo, a developer on a 1 TB M1 Max found 472 GB gone after four or five months of daily use. None of it was code. It was logs, in two folders, from a session setup that never asked for debug output. The issue was closed as not planned, so the fix is on you. Here is where Claude Code keeps things on a Mac, which parts can go, and how to keep it small.
Measure first
du -sh ~/.claude ~/Library/Caches/claude-cli-nodejs 2>/dev/null
du -sh ~/.claude/* 2>/dev/null | sort -h | tail -8
The first line gives the two totals. The second shows the biggest things inside ~/.claude. If both are a few hundred MB, you are fine and can stop here.
Safe to delete: the two log folders
~/Library/Caches/claude-cli-nodejs holds a folder per project with --mcp-logs-* inside: everything your MCP servers printed, per session. A chatty server writes a lot, and nothing trims it. It is a cache in the literal sense; deleting it loses nothing.
~/.claude/debug holds per-session debug logs. Claude Code's own documentation lists it among the folders you can delete with "nothing user-facing" lost.
Quit every running Claude Code session, then:
rm -rf ~/Library/Caches/claude-cli-nodejs/*
rm -rf ~/.claude/debug/*
The same page lists plans/, session-env/, shell-snapshots/ and backups/ as safe too, plus the legacy todos/, statsig/, logs/ and image-cache/ that current versions no longer write. They are rarely big.
Think first: history you might want
projects/holds a transcript of every session, and each project's auto memory: the notes Claude keeps about your build commands and conventions. Delete it and you lose resume and rewind for old sessions, and the memory for every project.file-history/holds snapshots of files before Claude edited them, which is what checkpoint restore uses. Safe to clear for sessions you are done with.history.jsonlis your prompt history for up-arrow and Ctrl+R.
To clear one finished project instead of everything, Claude Code has a command that shows what it will delete before it does:
claude project purge ~/Development/old-project --dry-run
Drop --dry-run to do it. One more reason to trim projects/: transcripts are plain text, and anything a tool read, including a .env file, is in there.
Never delete
~/.claude.json (sign-in and per-project trust), ~/.claude/settings.json (your preferences) and ~/.claude/plugins/. And don't rm -rf ~/.claude to be done with it: you sign out, lose every project's memory, and the folder is back in a minute.
Stop it growing back
Claude Code deletes old session files on its own once they are older than cleanupPeriodDays. The default is 30 days. Lower it in ~/.claude/settings.json:
{
"cleanupPeriodDays": 14
}
The minimum is 1, and 0 is rejected as an error. The trade-off is real: the same setting removes old transcripts, so you can't resume a session older than that. And the sweep covers ~/.claude; the MCP logs in ~/Library/Caches aren't on its documented list, so check that folder every month or two.
Cursor, VS Code and the Claude app
Editors built on VS Code keep their caches in ~/Library/Application Support/Cursor and …/Code. The subfolders Cache, CachedData, Code Cache, GPUCache, logs and CachedExtensionVSIXs are rebuilt on the next launch; leave User alone, it is your settings and workspace state. The Claude desktop app is the same shape under ~/Library/Application Support/Claude: clear Cache, Code Cache and GPUCache, and leave vm_bundles alone.
In ddeploy
ddeploy finds all of this in one scan. User Caches and Logs clears ~/Library/Caches, which is where the MCP logs live. Claude Code Data shows how big ~/.claude is and opens it for you to look, but never deletes it, because your transcripts and memory are in there. Claude App and Cursor and VS Code clear only the cache folders listed above and never touch vm_bundles or your settings. The same scan covers Ollama, Hugging Face, LM Studio, Xcode, Docker and build folders. Scanning is free.
More for developers: Ollama and Hugging Face models · Docker Desktop disk space · Project build folders · Old iOS simulator runtimes
See what your AI tools are keeping on disk, folder by folder. Free to scan.
Download ddeploy