[DOCS] CLI reference missing `claude project purge` command

Resolved 💬 2 comments Opened May 1, 2026 by coygeek Closed May 2, 2026

Documentation Type

Missing documentation (feature not documented)

Documentation Location

https://code.claude.com/docs/en/cli-reference

Section/Topic

"CLI commands" section

Current Documentation

The CLI reference says it is the complete command-line reference:

"Complete reference for Claude Code command-line interface, including commands and flags."

The "CLI commands" table currently lists session, auth, MCP, plugin, remote-control, setup-token, and ultrareview commands, ending with:

"claude ultrareview [target] | Run ultrareview non-interactively..."

There is no entry for claude project purge [path].

What's Wrong or Missing?

Claude Code v2.1.126 added claude project purge [path] to delete all Claude Code state for a project, including transcripts, tasks, file history, and the config entry. The command supports --dry-run, -y/--yes, -i/--interactive, and --all.

The CLI reference is the natural place users will look for this destructive state-management command, but it does not document:

  • the claude project purge [path] command
  • what project state it removes
  • how [path] is resolved
  • the safety flags (--dry-run, confirmation modes, and --all)
  • any warning about irreversible deletion of transcripts/tasks/file history

The settings page documents that per-project state exists in ~/.claude.json, but it does not point users to the new purge command:

"This file contains your OAuth session, MCP server configurations for user and local scopes, per-project state (allowed tools, trust settings), and various caches."

Suggested Improvement

Add claude project purge [path] to the "CLI commands" table, for example:

| Command | Description | Example |
| :-- | :-- | :-- |
| claude project purge [path] | Delete Claude Code state for a project, including transcripts, tasks, file history, and its config entry. Use --dry-run to preview removals, -i/--interactive to choose what to remove, -y/--yes to skip confirmation, and --all to purge all project state. | claude project purge . --dry-run |

Also consider adding a short warning immediately below the table:

claude project purge removes local Claude Code project history. Run with --dry-run first to review what will be deleted.

Impact

Medium - Makes feature difficult to understand

Additional Context

Affected Pages:

| Page | Line(s) | Context |
|------|---------|---------|
| https://code.claude.com/docs/en/cli-reference | 5-33 | CLI reference claims to be the complete command-line reference and lists CLI subcommands, but omits claude project purge [path]. |
| https://code.claude.com/docs/en/settings | 117 | Documents per-project state in ~/.claude.json, which overlaps with the state removed by the new purge command. |

Total scope: 2 pages affected

This was added in Claude Code v2.1.126.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗