Source Intelligence

DisclaimerUnofficial, and not affiliated with Anthropic. Nearly all of this is read straight out of what ships: npm bundles, captured prompts, published docs. Anthropic's own notes go in verbatim, marked as theirs. The rest is my reading, and every entry carries the strings behind it. If one looks wrong, vote it down and say why.

All of v2.1.124 Home All releases olderv2.1.123 v2.1.126newer
Claude Code v2.1.124

claude project purge command

What

A new CLI subcommand that deletes every piece of Claude Code state belonging to a project — transcripts, task lists, debug logs, file edit history, the project entry in ~/.claude.json, and the matching prompt-history lines.

Usage
# Purge state for the current directory (interactive picker if no path given)
claude project purge

# Purge for a specific project path
claude project purge /path/to/repo

# Show what would be deleted without deleting
claude project purge --dry-run

# Skip the confirmation prompt
claude project purge --yes

# Step through each item with delete/skip/all/abort prompts
claude project purge -i
claude project purge --interactive

# Purge state for ALL projects on this machine
claude project purge --all
Details
  • The interactive picker lists every project that has state on disk (current cwd plus anything found under ~/.claude/projects/) so you can pick one to purge.
  • A "purge plan" is printed before any deletion runs, e.g. dir: <path> project transcripts (.jsonl) and memory/, config: projects["<path>"] project entry in ~/.claude.json (trust, history, MCP servers), filter: <path>/history.jsonl N prompt(s) typed in this project.
  • --all is mutually exclusive with both a path argument and --interactive; the CLI errors with Cannot specify both a path and --all. / Cannot use -i/--interactive with --all. if you mix them.
  • Warnings are printed (not deleted): shell-snapshots/ are not project-scoped and will not be touched, and backups/ may still contain this project entry in old .claude.json snapshots (...); at most 5 are kept and they rotate out automatically.
  • A safety check refuses to overwrite the config if an in-process re-read is missing auth that the cache has — preventing accidental credential loss (GH #3117).
Evidence

Project purge command (search for "Manage Claude Code project state" and "Delete all Claude Code state for a project (transcripts, tasks, file history, config entry)").

Strings lifted out of the shipped bundle, so the claim above can be checked against them.

See this entry in the whole of v2.1.124 →