What is in ~/.claude, and what is safe to delete
Last checked 12 October 2026
~/.claude grows mainly from conversations in projects/, old versions in ~/.local/share/claude/versions and file-history/. Caches, logs and old versions are safe to delete. Conversations are safe if you won't resume them. Never delete settings, CLAUDE.md, memory/ folders or your credentials.
What is in ~/.claude
Claude Code writes everything to ~/.claude, unless you moved it with the CLAUDE_CONFIG_DIR environment variable. Native installs also keep every version they downloaded in ~/.local/share/claude/versions. Here is what each folder is, and what removing it costs you.
| Path | What it is | Verdict | What you lose |
|---|---|---|---|
projects/ | Your conversations, one folder per project, one .jsonl file per session | Review | Those sessions can no longer be resumed with claude --resume. Your project files are not modified. |
projects/*/memory/ | Claude's long-term memory for that project | Never delete | What Claude has learned about the project |
file-history/ | Undo history of the files Claude edited | Safe | Those edits can no longer be rewound. Your files stay as they are. |
uploads/, paste-cache/ | Copies of images and files you pasted into a session | Safe | Nothing: the originals stay where they are |
shell-snapshots/, session-env/, todos/, statsig/, telemetry/, cache/ | Temporary files | Safe | Nothing visible: Claude Code recreates them |
debug/ | Internal logs | Safe | Nothing visible |
plugins/cache/ | Downloaded plugin files | Safe | They are downloaded again when needed |
plugins/marketplaces/ | Plugin catalogs | Review | Downloaded again when needed |
backups/ | Old backups of your settings | Review | Your current settings are not modified |
settings.json, CLAUDE.md, skills/, agents/, commands/, hooks/, plans/ | Your configuration and instructions | Never delete | Your setup |
history.jsonl | Your prompt history (arrow-up recall) | Never delete | Your prompt history |
.credentials.json, ~/.claude.json | Your sign-in and account state | Never delete | You are signed out |
What grows the most
On a Mac used every day, three things usually account for almost all of the space:
- Conversations in
projects/. Every message, tool call and file read is stored. Long agentic sessions with large files can reach hundreds of megabytes each. - Old versions in
~/.local/share/claude/versions. Each update downloads a new version and keeps the previous ones. - File history in
file-history/, which keeps a copy of every file Claude edited so the edit can be rewound.
To see it on your own Mac:
du -sh ~/.claude/* 2>/dev/null | sort -h | tail -10
du -sh ~/.claude/projects/* 2>/dev/null | sort -h | tail -10
du -sh ~/.local/share/claude/versions/* 2>/dev/nullNothing above deletes anything.
How to clean it by hand
Quit every Claude Code session first. Cleaning a folder an open session is writing to interrupts that session.
Safe items can be deleted directly:
rm -rf ~/.claude/file-history ~/.claude/shell-snapshots ~/.claude/paste-cache \
~/.claude/debug ~/.claude/plugins/cacheOld versions: keep the one your claude command points to.
readlink ~/.local/bin/claude # the version in use
ls ~/.local/share/claude/versions # all versions keptDelete the other folders in versions/, never the one readlink shows.
Old conversations: delete the project folders you no longer need in ~/.claude/projects/, but keep any memory/ folder inside them. Folder names are the project path with slashes replaced by dashes, so -Users-you-code-myapp is ~/code/myapp.
Claude Code also removes old conversation files on its own at startup, after the number of days set by cleanupPeriodDays in settings.json (30 by default). If you rely on old sessions, raise it; if projects/ keeps growing, lower it.
What you should never delete
Your settings, CLAUDE.md, skills, agents, commands, hooks and plans are your setup. history.jsonl is your prompt history. Every memory/ folder is what Claude remembers about a project. .credentials.json and ~/.claude.json hold your sign-in. Deleting ~/.claude as a whole removes all of them.
Doing it with Ouste
Ouste shows each of these items with its size and the sentence above, deletes the safe ones, and puts conversations in a 7-day quarantine you can restore in one click. You can export a project's conversations to Markdown before removing them, so you keep what was decided and drop the weight.
Questions
Can I delete ~/.claude/projects?
Only the project folders whose conversations you no longer need to resume, and keep the memory/ folder inside each one. Your code is not affected.
Is it safe to delete old Claude Code versions?
Yes, except the one ~/.local/bin/claude points to. Run readlink ~/.local/bin/claude to see it.
Does Claude Code clean up old conversations itself?
Yes: at startup it removes conversation files older than cleanupPeriodDays, 30 days by default. You can change it in settings.json.