What is the ~/.claude folder on Mac? Can you delete it?
Do not delete ~/.claude wholesale. Your settings, instructions, custom commands and session transcripts in it are your own work. You can remove transcripts of old sessions you no longer need, after looking at what is there.
Where it is
~/.claudeWhat it is
Claude Code, Anthropic's coding agent for the terminal, keeps its per-user data in ~/.claude. Files you wrote or configured are here: settings.json, a global CLAUDE.md with your instructions, and any custom commands, agents, skills and plugins.
The part that grows is the history. The projects folder holds a transcript of each session, grouped by the folder you ran it in, and there are smaller folders for things like file checkpoints and shell snapshots. Long sessions with large tool output make large transcripts.
Claude Code removes transcripts older than a set number of days by itself. The period can be changed with the cleanupPeriodDays setting in settings.json.
How big it gets
Usually tens to hundreds of MB, and it can reach a few GB after months of heavy use.
How to clear it by hand
- Run the command below to see which parts are largest. It only reads sizes.
- Close any running Claude Code sessions.
- Open ~/.claude/projects in Finder. Each subfolder belongs to one project folder on your Mac. Move the ones you no longer need to the Trash.
- Keep settings.json, CLAUDE.md and the commands, agents, skills and plugins folders. They are things you wrote or set up, and nothing recreates them.
du -sh ~/.claude/* | sort -hr | head -15What happens afterwards
Sessions whose transcripts you removed can no longer be resumed or searched. Your projects' own files are not stored here and are not affected. If you delete the whole folder, Claude Code starts again with default settings.
How Diskzy handles it
Diskzy shows ~/.claude on the disk map with the size of each subfolder, and Search can list its largest or oldest files. Anything you remove with Diskzy goes to the Trash first.
Related guides
See where your Mac's space went
Diskzy maps your disk, explains System Data and clears what's safe. Free for 72 hours, then $9 once for 2 Macs.
Try Diskzy for free