How to uninstall Claude Code on a Mac, and what it leaves

The uninstall command for each way Claude Code is installed on a Mac, the folders it leaves behind, how big they get, and what you lose if you delete them.

Short answer

To uninstall Claude Code on a Mac, remove the program the way it was installed: rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude for the native installer, brew uninstall --cask claude-code for Homebrew, or npm uninstall -g @anthropic-ai/claude-code for npm. That removes only the program. Your settings, chat history and plugins stay in ~/.claude and ~/.claude.json. On my Mac the uninstall would free 1.2 GB and leave 7.7 GB.

If you'd rather use an app for the cleanup, see which Mac cleaners handle developer folders.

Step 1: find out how it's installed

There are three ways Claude Code gets onto a Mac, and each has its own uninstall. This shows every copy on your path:

Terminal
$ which -a claude
It printsYou have
~/.local/bin/claudeThe native installer
a path under /opt/homebrewHomebrew
a path under an npm or node foldernpm

Two lines mean two installs. Remove both, or claude will still run.

Step 2: remove the program

Native installer:

Terminal
$ rm -f ~/.local/bin/claude
$ rm -rf ~/.local/share/claude

Homebrew (use claude-code@latest if that's the cask you installed):

Terminal
$ brew uninstall --cask claude-code

npm:

Terminal
$ npm uninstall -g @anthropic-ai/claude-code

These are the commands from Anthropic's own setup page. If claude still runs afterwards, you have a second install or an old shell alias.

Step 3: decide about what's left

The uninstall stops there. Everything Claude Code wrote while you used it is still on the disk. Here's my Mac on 16 November 2026, after about six weeks of daily use:

Bar chart: uninstalling Claude Code removes 1.2 GB of program files and leaves 7.7 GB in ~/.claude

PathSizeWhat it isRemoved by the uninstall
~/.local/share/claude1.2 GBThe program: three versions, about 320 MB eachYes
~/.claude/projects6.5 GB2,206 chat transcripts in 72 project foldersNo
~/.claude/plugins952 MBInstalled plugins and their cacheNo
~/.claude/telemetry177 MBUsage logsNo
the rest of ~/.claudeabout 120 MBSettings, skills, file history, shell snapshotsNo
~/Library/Caches/claude-cli-nodejs9.7 MBA cacheNo
~/.claude.json and its backupsunder 1 MBAccount state and per-project settingsNo

To remove the settings and history as well, Anthropic's page gives these:

Terminal
$ rm -rf ~/.claude
$ rm ~/.claude.json
Check first

This deletes your settings, allowed tools, MCP server setup and all session history. It also deletes anything you added yourself: skills, memory files and a global CLAUDE.md. If you might come back, copy ~/.claude/settings.json, ~/.claude/CLAUDE.md and ~/.claude/skills somewhere first.

Two small leftovers aren't on Anthropic's page. They're safe to remove:

Terminal
$ rm -rf ~/Library/Caches/claude-cli-nodejs ~/.local/state/claude

Step 4: the files in your projects

Claude Code also writes into the projects you used it in: a .claude folder, and sometimes a .mcp.json. I found 23 .claude folders under my projects folder. This lists yours without deleting anything:

Terminal
$ find ~/Projects -maxdepth 3 -name .claude -type d

Look before you delete. In a shared repository these files may be committed on purpose, because they hold the team's settings for the project.

If ~/.claude comes back

Then something else is still using it. Anthropic's page says the VS Code extension, the JetBrains plugin and the Claude desktop app all write to ~/.claude, and recreate it the next time they run. Uninstall those first.

The desktop app is a separate thing: /Applications/Claude.app, with its data in ~/Library/Application Support/Claude. On my Mac that folder was 12 GB, and 9.6 GB of it was one subfolder, vm_bundles. Removing the command-line tool doesn't touch any of it.

If you only want the space back

You don't have to uninstall to get most of it. The 6.5 GB of transcripts is the bulk, and old ones can go while you keep using Claude Code. The AI coding tools disk space guide covers which parts clean themselves up and which don't.

Shedi finds old Claude Code chats and plugin versionsIt lists Claude Code chats untouched for 30 days per project, plugin versions Claude Code marked unused, and the Claude app's caches, with sizes and what you lose, and moves what you pick to the Trash.
Get Shedi

Sources

  • Anthropic, Claude Code docs, "Set up Claude Code": the uninstall commands for the native installer, Homebrew and npm, the "Remove configuration files" step, and the note that the VS Code extension, JetBrains plugin and desktop app recreate ~/.claude. Read on 16 November 2026.
  • Measured on this Mac on 16 November 2026 (macOS 26.5.1, Claude Code 2.1.325, native install): du on each path, a count of transcripts and project folders in ~/.claude/projects, and a count of .claude folders under ~/Projects. Nothing was deleted, and Claude Code was not uninstalled.
  • Shedi's rules for agent leftovers and its uninstaller.

Questions

How do I uninstall Claude Code on a Mac?

For the native installer, run rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. For Homebrew, run brew uninstall --cask claude-code. For npm, run npm uninstall -g @anthropic-ai/claude-code. Run which -a claude first to see which one you have.

Does uninstalling Claude Code delete my chats and settings?

No. The uninstall removes only the program. Your settings, session history, plugins and skills stay in ~/.claude and ~/.claude.json until you delete them yourself.

Is it safe to delete the ~/.claude folder?

It's safe for the Mac, but it deletes your Claude Code settings, allowed tools, MCP server setup, session history, skills and memory files. Copy out what you want to keep first.

How much space does Claude Code use on a Mac?

On my Mac the program itself was 1.2 GB for three versions, and ~/.claude was 7.7 GB, of which 6.5 GB was chat transcripts. A light user will have far less.

Why does the ~/.claude folder come back after I delete it?

Something else that uses it is still installed. Anthropic's docs say the VS Code extension, the JetBrains plugin and the Claude desktop app all write to ~/.claude and recreate it the next time they run.

Is the Claude desktop app the same as Claude Code?

No. The desktop app is /Applications/Claude.app with its own data in ~/Library/Application Support/Claude. Uninstalling Claude Code from the terminal doesn't remove it, and removing the app doesn't remove the command-line tool.