Claude Code kept four copies of itself, and 577 MB of old sessions
Claude Code stores each installed version in ~/.local/share/claude and every session in ~/.claude/projects. Measured at 1.7 GB, most of it removable.
Claude Code updates itself often, and the native installer keeps the previous builds next to the current one. Each is a complete, self-contained executable of around 200 MB.
Versions
| Version folder | Size |
|---|---|
2.1.266 | 190 MB |
2.1.280 | 207 MB |
2.1.281 | 211 MB |
2.1.282 | 212 MB |
ClaudeCode.app | 293 MB |
Four versions is 820 MB, and only one of them runs. The others are there so an update can be rolled back.
Sessions
~/.claude/projects held 577 MB: one folder per project directory, with a transcript file per session. They are what claude --resume reads. The rest of ~/.claude was small: skills 11 MB, plugins 7 MB, file history 7 MB.
Check yours
claude --version
du -sh ~/.local/share/claude/versions/* ~/.claude/* 2>/dev/null | sort -h
# Largest projects by transcript size
du -sh ~/.claude/projects/* | sort -h | tailWhat is safe to remove
- Every version folder except the one
claude --versionreports. The updater downloads what it needs. - Transcripts for projects you are done with. Remove that project's folder under
~/.claude/projects. You lose the ability to resume those sessions, nothing else. - Not
~/.claude/settings.json, your skills, or your plugins, which are configuration rather than cache.
For transcripts there is also a setting: cleanupPeriodDays in ~/.claude/settings.json controls how long session files are kept before Claude Code removes them itself.
The Codex CLI makes the same kind of mess in different folders, measured in Codex CLI taking up space. The editors are in AI coding tools taking up space.
Common questions
Where does Claude Code store its files on a Mac?
Installed versions are in ~/.local/share/claude/versions, and settings, skills and session transcripts are in ~/.claude.
Is it safe to delete old Claude Code versions?
Yes. Keep the folder matching claude --version and remove the rest. On the Mac measured each was about 200 MB.
What is the ~/.claude/projects folder?
Session transcripts, one folder per project directory. They are what claude --resume reads. Deleting one only loses those old sessions.
How do I stop Claude Code transcripts piling up?
Set cleanupPeriodDays in ~/.claude/settings.json to the number of days you want sessions kept.