Cmd. claude purge
Remove local project session data through the terminal CLI.
Written and reviewed by Eric Han · Co-founder & CTO, reopt
Key takeaways
- Remove local project session data through the terminal CLI.
- Check the input surface and availability before using the examples below.
Purpose
Remove local project session data through the terminal CLI. Named claude project purge before v2.1.288.
claude purge [path]
claude project purge [path]Availability
| Field | Value |
|---|---|
| Input surface | Terminal shell |
| Kind | Terminal CLI |
| Status | Current reference |
| Aliases | — |
| Documented minimum | Not specified |
| Reviewed against | 2026-10-23 · Claude Code 2.1.308 |
claude project purge became claude purge in v2.1.288. The older name still works and prints a notice; installations older than v2.1.288 use the older name.
Examples
claude purge ~/work/repo --dry-runEffects and persistence
The purge operation deletes the project's transcripts, task lists, debug logs, file-edit history, prompt history lines, and its entry in ~/.claude.json. The --dry-run example only previews what would be deleted.
Cautions
Do not run the destructive operation until you have checked its target and retained any session data you need. The command was named claude project purge before v2.1.288; the older name still works and prints a notice.