What's in ~/.claude, and what's safe to delete?
~/.claude is where Claude Code keeps your settings and session history. Most of it cleans itself up. Here's what's in it, what you can delete by hand, and what to leave alone.
The short answer
Session data, such as transcripts, file snapshots and logs, is safe to delete. You lose the ability to resume or rewind those past sessions, and new sessions are unaffected. Don't delete ~/.claude.json, ~/.claude/settings.json or ~/.claude/plugins/: they hold your sign-in, your preferences and your installed plugins.
What's inside
| Path | What it is | Delete it? |
|---|---|---|
projects/ | Full transcripts of every session, plus each project's auto memory | Safe, but you lose resume and rewind for past sessions, and auto memory. Usually the biggest part |
file- | Copies of files from before Claude edited them, for checkpoint restore | Safe. You lose checkpoint restore for past sessions |
history.jsonl | Every prompt you've typed | Safe. You lose up-arrow recall and Ctrl+R search. Never cleaned automatically |
plans/, debug/, session-, shell-, backups/ | Plans, debug logs and session leftovers | Safe. Nothing you'd notice |
todos/, statsig/, logs/ | Left over from older versions | Safe |
settings.json, plugins/, skills/, agents/, CLAUDE.md | Your settings, plugins, skills, subagents and instructions | Keep |
~/ (next to the folder) | Your sign-in, MCP servers and per-project trust | Keep |
Based on Anthropic's documentation for the .claude directory. On our Mac, ~/.claude was 938 MB, and over half of that was projects/.
It mostly cleans itself
Claude Code deletes transcripts and other session data older than 30 days, in the background after a session starts. You can change the period with cleanupPeriodDays in ~/.claude/settings.json:
{ "cleanupPeriodDays": 14 }
The minimum is 1. The one thing it never cleans is history.jsonl, which keeps every prompt until you delete it. So if your ~/.claude is big, it's usually recent transcripts, a long retention setting, or a large prompt history.
Clear one project
Claude Code has a command for this. Preview it first:
claude project purge ~/path/to/project --dry-run
Run it without --dry-run to delete. It lists everything it will remove and asks before deleting: the project's transcripts and memory, its file snapshots and debug logs, its lines in history.jsonl, and its entry in ~/.claude.json. Use --all instead of a path to clear every project.
A privacy note
Transcripts are plain text. Anything a tool read during a session, including a .env file, can end up in them. A shorter cleanupPeriodDays means less of that sitting on your disk.
The desktop app keeps its own data
If you use Claude Code in the Claude desktop app, the app also keeps data in ~/Library/Application Support/Claude, including a virtual machine for Cowork. See hidden folders AI coding tools leave on your Mac.
How Macaroom handles it
Macaroom shows ~/.claude under Developer & AI tools as Claude Code data, marked Manage in app. It can't be selected, so Macaroom never removes your settings or sign-in by accident. Use cleanupPeriodDays or claude project purge to trim it.
Related guides
See it on your own Mac
Macaroom scans your Mac, names what each chunk of storage is, and marks what's safe to clear. Anything you remove goes to the Trash, so you can put it back.
Get Macaroom