Guide

How to delete Claude Code's saved chats for a project

Published · Updated

A dark Windows PowerShell window listing the .claude projects folder and a claude purge dry run

Short answerClaude Code stores each project's chats in .claude/projects in your user folder as plain text. Run claude purge . --dry-run to preview what would go, then claude purge . to delete it. Deleting cannot be undone.

Claude Code keeps a copy of your chats on your own computer, as plain text. That includes anything it read from your files while working, even a file with secrets in it. You can see it, and you can delete it.

Step 1: Look at what is stored

PowerShell
dir $env:USERPROFILE\.claude\projects

Every project you used Claude Code in has its own folder. Inside are the full chats: messages, commands and the files it read. By default they are kept for 30 days.

Step 2: Preview the delete

PowerShell
claude purge . --dry-run

--dry-run deletes nothing. It only shows the plan.

Step 3: Delete for real

PowerShell
claude purge .

It asks before it deletes. It removes the chats, the edit history and the matching prompt history for that project.

Read this first

  • Deleting cannot be undone. Read the dry-run plan before you run the real one.
  • Want it for every project? Check claude purge --help for the option.
  • To keep less in future, lower the number of days in your Claude Code settings so old chats clear out sooner.

The example in the video is made up. Your folders and project names will look different.

If a secret ended up in a chat

Change the password or key first, then purge the project's chats. Deleting the history removes the copy on your computer, but the secret itself still needs replacing.

More quick tips

Keep reading
All guides →