cd /news/ai-tools/how-much-disk-space-claude-code-code… · home › topics › ai-tools › article
[ARTICLE · art-177904] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=· neutral

How much disk space Claude Code, Codex and Cursor use on a Mac

A developer measured the disk footprint of Claude Code, Codex and the Claude desktop app on a 256 GB MacBook and found they consumed about 18 GB, roughly 7% of the drive, with most of it invisible in macOS Storage settings. Claude Code conversation transcripts alone accounted for 6.9 GB across 683 files, while Codex sessions, cached updates and runtimes added another 6.7 GB, and the developer noted that Claude Code's default 30-day transcript cleanup skips sessions started in the desktop app unless a separate desktopSessionCleanupPeriodDays setting is configured. Cursor users on the company's forum separately reported its local state.vscdb database growing to 188 GB in one case.

recommendation

Audit ~/.claude, ~/.codex, ~/Library/Caches and /private/tmp/claude-* with du, and set both cleanupPeriodDays and desktopSessionCleanupPeriodDays in ~/.claude/settings.json to bound transcript growth.

more in playbook: Running AI in production
by read3 min views6 publishedNov 28, 2026

I use Claude Code, Codex and the Claude desktop app every day on a 256 GB MacBook. On 12 November I measured what they keep on the disk. It came to about 18 GB, a little over 7% of the drive, and apart from the ChatGPT app, Storage settings shows none of it under the tools' names.

What Where Size
Claude Code conversations (683 transcripts) ~/.claude/projects 6.9 GB
Codex sessions, archived sessions, images it made, plugins ~/.codex 3.1 GB
Codex updates it had already downloaded ~/Library/Caches/com.openai.codex 2.0 GB
Codex runtimes for running code ~/.cache/codex-runtimes 1.6 GB
Claude Code scratch folders /private/tmp/claude-501 1.1 GB
Claude app web, code and GPU caches ~/Library/Application Support/Claude 1.1 GB
The ChatGPT app itself /Applications 1.9 GB

The caches, updates, runtimes and scratch folders come to about 6 GB, and they come back by themselves. I cleared the Codex runtimes on 5 September. Ten days later they were back to 1.6 GB, and they're 1.6 GB again now. The scratch folders can get much bigger than this: on 11 September I cleared 9.1 GB of build trees that earlier Claude Code sessions had left in /private/tmp.

The histories come to about 10 GB, and they only grow. ~/.claude was 1.7 GB on 1 October, 6.0 GB on 5 November and 7.0 GB on 12 November.

Cursor isn't installed on my Mac, so these are its users' own reports on the Cursor forum. In July one user found ~/Library/Application Support/Cursor at 231.3 GB, with a single file, state.vscdb, at 188.3 GB. In September another reported about 125 GB on one long-running project. In March a third had 72 .pack files over 1 GB each.

state.vscdb is Cursor's local database, where it keeps chat and agent history. Deleting it resets that history, so treat it as a record rather than a cache.

Claude Code is meant to tidy its own transcripts. Its cleanupPeriodDays setting deletes them after 30 days by default. But its settings documentation also says it keeps the transcripts of sessions started or continued in the Claude desktop app at any age, unless a second setting, desktopSessionCleanupPeriodDays, gives them a limit too. I run Claude Code from the desktop app, and the Mac had 132 transcripts older than 30 days, 1.2 GB in all.

To keep a limit on both kinds, add this to ~/.claude/settings.json:

{
  "cleanupPeriodDays": 30,
  "desktopSessionCleanupPeriodDays": 60
}

A transcript then goes once it is older than both numbers. It goes without a message, and you can't resume that conversation afterwards, so copy ~/.claude/projects somewhere first if you want a record. The second setting needs Claude Code 2.1.248 or later.

These are the default locations:

du -sh ~/Library/Application\ Support/Claude/{Cache,Code\ Cache,GPUCache} 2>/dev/null
du -sh ~/Library/Caches/com.openai.* ~/Library/Caches/com.anthropic.* 2>/dev/null
du -sh ~/.cache/* ~/.codex ~/.claude ~/.ollama 2>/dev/null
du -sh ~/Library/Application\ Support/Cursor ~/.cursor 2>/dev/null
du -sh /private/tmp/claude-* 2>/dev/null

~/.claude, ~/.codex, Cursor's state.vscdb): Only on purpose. Move it to the Trash rather than deleting it outright, so it can come back.~/.ollama: Only the ones you're finished with, and with the tool's own remove command where it has one. I make Atzuno Safe Data Cleaner (formerly RefreshYourMac), a Mac cleaner that rates everything on the disk by what cleaning it would cost. Its AI tools section rates Codex updates and runtimes safe to remove, sends Claude's desktop caches and Claude Code's scratch folders to review, and never touches the histories automatically. That section is in the download from atzuno.com. The Mac App Store edition is sandboxed and can't reach these folders. It's $14.99 a year with the first 7 days free, or $24.99 once. The full write-up, with 51 days of the app's own cleanup log, is on atzuno.com.

── more in #ai-tools 4 stories · sorted by recency
── more on @claude code 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/how-much-disk-space-…] indexed:0 read:3min 2026-11-28 · —