Roomy
Guide

Where Claude Code stores its data on macOS

Claude Code keeps a transcript of every session so you can resume it later, plus snapshots of every file it edits so you can rewind. The desktop app adds sandbox VM images on top. None of it is cleaned up aggressively, and together it can reach 10 GB or more.

Applies to Claude Code CLI and the Claude desktop app on macOS. Last reviewed October 2026.

Short answer. Claude Code keeps session transcripts in ~/.claude/projects, one folder per project, and edit snapshots in ~/.claude/file-history. Both are needed to resume or rewind past sessions, so treat them as irreversible. The desktop app's vm_bundles folder under ~/Library/Application Support/Claude is usually the single largest item and is safe to delete. Set cleanupPeriodDays in your settings to prune transcripts automatically.

Find out how much Claude is using

du -sh ~/.claude
du -sh ~/.claude/* | sort -rh | head
du -sh ~/Library/Application\ Support/Claude/* | sort -rh | head

Claude Code CLI: ~/.claude

FolderWhat it holdsDelete?
~/.claude/projects/ One folder per project, named after the project path with slashes replaced by dashes. Inside are JSONL transcripts of every session. These power claude --resume and --continue. Usually the largest folder. Irreversible
~/.claude/file-history/ Snapshots of files before Claude edited them, used by /rewind. Irreversible
~/.claude/debug/ Debug logs, one per session. Never read unless you are filing a bug. Safe
~/.claude/paste-cache/
~/.claude/shell-snapshots/
Pasted content and shell environment snapshots from past sessions. Safe
~/.claude/settings.json
~/.claude/CLAUDE.md
~/.claude/skills/, plugins/
Your configuration, global instructions, skills and plugins. Keep

Built-in retention

Claude Code prunes old transcripts on its own after a retention period, controlled by cleanupPeriodDays in ~/.claude/settings.json. Lowering it is the simplest ongoing fix:

{
  "cleanupPeriodDays": 14
}

That only covers transcripts. Transcripts for projects you have deleted still stay until the period expires, and the retention does not apply to the desktop app's data below.

Claude desktop app: ~/Library/Application Support/Claude

FolderWhat it holdsDelete?
…/Claude/vm_bundles/ Virtual machine images used to run Claude Code in a sandbox from the desktop app. Multiple versions accumulate. Often the single largest item, 5–15 GB. Safe
…/Claude/claude-code-vm/ The working VM state for sandboxed sessions. Safe
…/Claude/Cache
…/Claude/Code Cache
Chromium caches for the Electron shell. Safe

Quit the Claude app before deleting any of these. The VM bundles are re-downloaded the next time you start a sandboxed session, so expect a wait on first use afterwards.

The runaway temp file problem

Claude Code writes the output of background tasks to files in its temp directory under /tmp. There is no size cap, and there are public reports of a single output file growing to hundreds of gigabytes when a background command never stopped printing. If your disk fills up suddenly during a session, check there first:

du -sh /tmp/claude-*/ 2>/dev/null
ls -laS /tmp/claude-*/ 2>/dev/null | head

Stopping the session clears the task. The files themselves are safe to delete once no session is running.

Common questions

Where does Claude Code store session transcripts?

In ~/.claude/projects, one folder per project named after the project path with slashes replaced by dashes. Each session is a JSONL file used by claude --resume and --continue.

How do I make Claude Code delete old transcripts automatically?

Set cleanupPeriodDays in ~/.claude/settings.json. Transcripts older than that many days are pruned.

What are the vm_bundles in the Claude desktop app folder?

Virtual machine images used to run Claude Code in a sandbox from the desktop app. They are safe to delete and are re-downloaded when a sandboxed session next starts.

Or let Roomy do it

Roomy lists Claude Code transcripts one row per project with the date of the last session, so you can drop the ones for projects you have not touched in a year and keep the rest. Session history is marked Irreversible and never bulk-selected. VM bundles and caches are marked Safe. Everything goes to the Trash only after you confirm.

Scan your Mac free with Roomy

Related: Why Cursor uses so much disk space · Where Ollama stores models

Home · Roomy for AI tools · Documentation · Privacy · Cookie preferences