Skip to content
How it worksSafetyPricingQuestions
FR · Français Download
← Where AI coding agents store data on your Mac, and what is safe to delete

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.

PathWhat it isVerdictWhat you lose
projects/Your conversations, one folder per project, one .jsonl file per sessionReviewThose sessions can no longer be resumed with claude --resume. Your project files are not modified.
projects/*/memory/Claude's long-term memory for that projectNever deleteWhat Claude has learned about the project
file-history/Undo history of the files Claude editedSafeThose edits can no longer be rewound. Your files stay as they are.
uploads/, paste-cache/Copies of images and files you pasted into a sessionSafeNothing: the originals stay where they are
shell-snapshots/, session-env/, todos/, statsig/, telemetry/, cache/Temporary filesSafeNothing visible: Claude Code recreates them
debug/Internal logsSafeNothing visible
plugins/cache/Downloaded plugin filesSafeThey are downloaded again when needed
plugins/marketplaces/Plugin catalogsReviewDownloaded again when needed
backups/Old backups of your settingsReviewYour current settings are not modified
settings.json, CLAUDE.md, skills/, agents/, commands/, hooks/, plans/Your configuration and instructionsNever deleteYour setup
history.jsonlYour prompt history (arrow-up recall)Never deleteYour prompt history
.credentials.json, ~/.claude.jsonYour sign-in and account stateNever deleteYou are signed out

What grows the most

On a Mac used every day, three things usually account for almost all of the space:

  1. Conversations in projects/. Every message, tool call and file read is stored. Long agentic sessions with large files can reach hundreds of megabytes each.
  2. Old versions in ~/.local/share/claude/versions. Each update downloads a new version and keeps the previous ones.
  3. 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/null

Nothing 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/cache

Old versions: keep the one your claude command points to.

readlink ~/.local/bin/claude          # the version in use
ls ~/.local/share/claude/versions      # all versions kept

Delete 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.

Ouste does this for you. It finds what your agents leave behind, says what each item is and what you lose, and puts anything you might regret in a 7-day quarantine. Free to scan and clean.

Download Ouste

macOS 14 or later · Apple Silicon

Less noise. More control.

Product

  • How it works
  • Safety
  • Pricing
  • Questions

Information

  • Legal notice and terms
  • Privacy
  • Guides
  • contact@ouste.space

Language

  • Français
  • English
© 2026 Ouste. Published by Adeo Consulting, Paris. macOS 14 or later · Apple Silicon