Is it safe to delete the .claude folder on Mac?

Safe with care~/.claude

Only parts of it. ~/.claude holds Claude Code's settings, memory and saved chats. Old transcripts can go; settings, CLAUDE.md, memory and skills should stay.

Updated 1 December 2026 · 4 min read

Verdict: Safe with care. Only some of ~/.claude is safe to delete. The big part is usually ~/.claude/projects, which holds a saved transcript of every Claude Code chat and can grow to many gigabytes. Old transcripts you will never resume can go. Your settings, CLAUDE.md, memory and skills should stay, because deleting them resets Claude Code and loses setup you cannot download again.

What lives in .claude

~/.claude is a hidden folder in your home folder. Claude Code, Anthropic's coding agent for the terminal, creates it the first time you run it and keeps everything for your user account there. The main parts are:

  • settings.json: your settings, permissions and hooks.
  • CLAUDE.md: your own instructions that apply to every project.
  • projects/: one folder per project you have opened, named after the project's path. Inside are chat transcripts as .jsonl files named by session ID, a folder per session for extra output such as subagent work, and sometimes a memory folder with notes Claude Code keeps for that project.
  • skills/ and plugins/: skills and plugins you added.
  • scheduled-tasks/: tasks set to run on a schedule, if you use them.
  • file-history/: copies of files from before Claude Code edited them, used to rewind changes.
  • history.jsonl: the prompts you typed, used for recalling earlier prompts.
  • Smaller folders such as cache, debug, shell-snapshots, session-env and telemetry, which hold working files.

There is also a separate file, ~/.claude.json, next to the folder rather than inside it. It holds Claude Code's own state and account details. Leave it alone.

What happens if you delete it

  • Old transcripts in projects/: Claude Code keeps working. Those chats no longer appear when you resume a session, and their history is gone.
  • A whole project folder in projects/: the same, plus that project's memory folder, if it has one.
  • settings.json, CLAUDE.md, skills, plugins or scheduled-tasks: lost. Claude Code falls back to its defaults, and you have to set everything up again by hand.
  • The whole folder: Claude Code behaves as if it had just been installed for your user. Your code is not touched, but every setting, instruction, memory, skill and saved chat is gone.

How to check its size safely

In Terminal, run:

du -sh ~/.claude/* 2>/dev/null | sort -h

This lists each part with its size, biggest last. It only reads. To see which projects hold the most chat history:

du -sh ~/.claude/projects/* 2>/dev/null | sort -h | tail -20

This shows the 20 largest project folders and also only reads.

In Finder, choose Go > Go to Folder, type ~/.claude and press Return. The folder is hidden, so press Command-Shift-Period if you want to see hidden items as you browse.

The safest way to get the space back

  1. Close Claude Code. End every session first, so no transcript is being written while you clean.

  2. List transcripts you have not touched for a while. This shows chat files not changed in the last 90 days, with their sizes:

    find ~/.claude/projects -maxdepth 2 -name '*.jsonl' -mtime +90 -exec du -h {} + | sort -h
    

    It only reads. Change 90 to suit you.

  3. Move them to the Bin. macOS 14 Sonoma and later include a trash command:

    find ~/.claude/projects -maxdepth 2 -name '*.jsonl' -mtime +90 -exec trash {} +
    

    Warning: this moves every transcript older than 90 days to the Bin, in every project. You can put them back until you empty the Bin. After that, those chats cannot be resumed. Each session can also have a folder with the same ID next to its .jsonl file; once you have removed a transcript, you can move its folder to the Bin too.

  4. Let Claude Code keep it in check. Its settings include cleanupPeriodDays, which sets how many days transcripts are kept before Claude Code deletes them. Anthropic's Claude Code settings documentation explains it.

If you have finished with a project for good, you can remove its whole folder in projects/, as long as you do not need its chats or the notes in its memory folder.

What never to touch

  • settings.json and any backups of it you made.
  • CLAUDE.md, your instructions for every project.
  • memory folders inside projects/. They are small, and they hold what Claude Code has learned about each project.
  • skills/, plugins/ and scheduled-tasks/, unless you are removing one you no longer use. Use Claude Code's own commands for plugins where you can.
  • ~/.claude.json, the file next to the folder.

Agents use disk space inside your projects too. If you run tasks in parallel, read our guide to clearing agent worktrees. For other hidden folders in your home, see the ~/.cache page.

How Headroom helps

Headroom never deletes anything in ~/.claude. AI agent data is on its list of places that are off limits, along with your SSH keys and other personal data. Its Space map shows the folder as "Claude Code chats and settings" with its size, so you can see when the chat history has grown and clear old transcripts yourself. The Clean scan also lists finished agent worktrees inside your projects, which often take far more room. The scan is free, and the $19 one-time licence clears what you tick. Read about the disk space analyser or download Headroom.

Questions

Why is my .claude folder so big?

Almost always because of ~/.claude/projects, where Claude Code saves a transcript of every chat, including tool output and subagent work. Long or busy sessions make large files, and they add up over months.

Can I delete ~/.claude/projects?

Not all of it. Each project folder holds that project's chat transcripts, which you can remove if you no longer need to resume those chats, but it can also hold a memory folder with notes Claude Code keeps for that project. Delete old .jsonl transcripts, not whole project folders.

What happens if I delete the whole .claude folder?

Claude Code starts as if it were new for your user: your settings, permissions, global CLAUDE.md instructions, memory, skills, plugins and chat history are gone. Your projects and code are not touched, but you lose all of your setup.

Will deleting old transcripts break Claude Code?

No. Claude Code keeps working. The chats you removed no longer appear when you resume a session, and their history is gone for good unless you moved them to the Bin.

Can Claude Code clean up old chats by itself?

Yes. Its settings include cleanupPeriodDays, which sets how many days chat transcripts are kept before Claude Code removes them. Check Claude Code's settings documentation for the default and how to change it.