Explore the .claude directory changedclaude-directory
Nearest release: v2.1.288, published 6 hours before upstream edited the page. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
Upstream edited this page at 3 Oct 2026 00:39 UTC, give or take a minute or two: the time comes from Anthropic’s own sitemap rather than from a commit. This site recorded the change at 3 Oct 2026 01:07 UTC.
Upstream edited
Recorded here
Lines+7added
Lines−5removed
From line
1,576
where the diff opens
First seen
14 Aug 2026
this site's first read of the page
Recorded edits49to this page, all time
The whole hunk
from line 1576, old and new numbered
/
from line 1576
15761576
15771577`<project>` is your working directory path with every character other than letters and digits replaced by `-`, such as `-Users-you-my-project`. If you set [`CLAUDE_CODE_TMPDIR`](/docs/en/env-vars), the tree moves under that directory instead. Hooks receive the current session's path as [`scratchpad_dir`](/docs/en/hooks#common-input-fields).
15781578
1579Scratchpad files last as long as the session's transcript: the [retention sweep](#cleaned-up-automatically) deletes the directory when it deletes the transcript, and [`claude project purge`](#clear-local-data) doesn't touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project.
1579Scratchpad files last as long as the session's transcript: the [retention sweep](#cleaned-up-automatically) deletes the directory when it deletes the transcript, and [`claude purge`](#clear-local-data) doesn't touch the temp directory. Because the directory sits under the system temp location, your operating system can also clear it, such as on restart. To keep something Claude wrote there, ask Claude to move it into your project.
15801580
15811581A session has a scratchpad only when all of these hold:
15821582
from line 1617
16171617
16181618### Clear local data
16191619
1620Run `claude project purge` to delete the state Claude Code holds for one project. It deletes:
1620Run `claude purge` to delete the state Claude Code holds for one project. It deletes:
16211621
16221622* Transcripts and auto memory under `projects/`
16231623* Per-session `tasks/`, `debug/`, and `file-history/` entries
from line 1628
16281628
16291629The command prints the full deletion plan and asks for confirmation before removing anything.
16301630
1631Before v2.1.288, the command was `claude project purge`.
1632
16311633The examples below use `~/work/my-repo` as a placeholder. Replace it with the path to your project. If no state matches the path, the command prints an error and exits with status 1.
16321634
16331635Preview the plan without deleting anything:
16341636
16351637```bash theme={null}
1636claude project purge ~/work/my-repo --dry-run
1638claude purge ~/work/my-repo --dry-run
16371639```
16381640
16391641The plan lists each matching item and why it is included:
from line 1658
16561658Delete with a single confirmation prompt:
16571659
16581660```bash theme={null}
1659claude project purge ~/work/my-repo
1661claude purge ~/work/my-repo
16601662```
16611663
16621664The command prints the same plan, then asks `Delete 3 item(s) for /home/user/work/my-repo? This cannot be undone. [y/N]` and deletes only if you answer `y`.
from line 1668
16661668Skip the confirmation prompt for use in scripts:
16671669
16681670```bash theme={null}
1669claude project purge ~/work/my-repo --yes
1671claude purge ~/work/my-repo --yes
16701672```
16711673
16721674Pass `--all` instead of a path to purge state for every project at once, which deletes `history.jsonl` outright rather than filtering it. Pass `-i` to step through the deletion plan one item at a time.
No line in this hunk matches that.