SiftMac
Is it safe to delete? · AI tools · Updated 21 November 2026

Is it safe to delete Claude Code’s ~/.claude folder?

By Mohit Nippanikar, who makes SiftMac

The short answer
On this page
  1. What it is
  2. Where it is
  3. How big it gets
  4. How to delete it safely
  5. What happens afterwards
  6. Questions

1. What it is

Claude Code, Anthropic’s coding agent for the terminal and editors, keeps everything personal in ~/.claude. Its documentation splits the folder into two kinds of files:

Transcripts are plain-text .jsonl files, one per session, holding everything that passed through a tool: file contents, command output, pasted text. They’re what lets you resume a session. Each project’s folder in projects also holds memory, the auto memory notes Claude saves for that project across sessions.

2. Where it is

~/.claude
~/.claude.json

~/.claude.json, next to the folder rather than in it, holds your account details, per-project trust decisions and personal MCP servers. If CLAUDE_CONFIG_DIR is set, both live under that folder instead. Claude Code itself is installed elsewhere: the native installer keeps its versions in ~/.local/share/claude/versions.

3. How big it gets

The configuration stays small. What grows is the data: transcripts and large tool outputs in projects, snapshots in file-history, and debug logs if you’ve run with debugging on. To see which:

du -sh ~/.claude/* 2>/dev/null | sort -h
du -sh ~/.claude/projects/* | sort -h

4. How to delete it safely

Let Claude Code do it. After a session starts, it runs a background sweep that deletes transcripts and other session data older than cleanupPeriodDays, 30 by default. To keep less, set a lower number in ~/.claude/settings.json:

{
  "cleanupPeriodDays": 14
}

Remove one project’s history with claude purge. It prints what it will delete and asks first: that project’s transcripts and auto memory, its tasks, debug and file-history entries, its lines in history.jsonl, and its entry in ~/.claude.json. Versions before v2.1.288 call it claude project purge.

claude purge ~/path/to/project --dry-run
claude purge ~/path/to/project

By hand, with Claude Code quit: Anthropic’s documentation says deleting debug, plans, session-env and shell-snapshots loses nothing you’d notice, and that the legacy todos, statsig, logs and image-cache folders aren’t used by current versions. Old transcripts in projects can go too, if you won’t resume them; keep each project’s memory folder.

Don’t delete ~/.claude.json, ~/.claude/settings.json or ~/.claude/plugins; Anthropic’s documentation says they hold your account details, preferences and installed plugins. It also lists .credentials.json and agent-memory among the state files to keep.

5. What happens afterwards

Questions

Does Claude Code clean up ~/.claude by itself?

Yes. Transcripts, file snapshots, plans, debug logs and other session data are deleted once they’re older than cleanupPeriodDays, 30 days by default. Settings, skills, plugins, history.jsonl and auto memory aren’t part of that sweep.

Can I delete the whole ~/.claude folder?

Only to reset Claude Code completely. You’d lose your settings, global CLAUDE.md, skills, agents and plugins along with every transcript and auto memory note.

Are transcripts private?

They stay on your Mac, but they’re plain text and include whatever passed through a tool, such as a file’s contents or a command’s output. Anthropic suggests a lower cleanupPeriodDays to keep them for less time.

What is ~/.claude/projects/<project>/memory?

Auto memory: notes Claude keeps about you and the project across sessions. The cleanup sweep doesn’t delete it; claude purge does, for the project you name.

How SiftMac handles it. Its AI files category lists Claude Code sessions in ~/.claude/projects you haven’t touched for the window you set (30 days by default), project by project, and never touches a project’s memory folder. Sessions are You decide, never ticked for you, and wait on the Undo Shelf for 7 days. It also lists old copies of Claude Code in ~/.local/share/claude/versions, keeping the newest and the one your claude command uses.

Download SiftMac · scanning is free, and so is your first 2 GB of cleaning · See how it works