Levo guides · Uninstalling apps

How to uninstall Claude Code on a Mac

Remove the claude program, then decide separately about its data. The program is the native install in ~/.local, an npm global or a Homebrew cask. Your settings, memory files and every past session sit in ~/.claude, and they stay until you delete them.

Levo’s popover on the Uninstall confirm step, listing an app and its leftovers with their sizes
WhatWhereSafe to delete?
CLI link (native install)~/.local/bin/claudeYes
Downloaded versions~/.local/share/claudeYes
npm install@anthropic-ai/claude-code in the global node_modulesYes, with npm uninstall -g
Homebrew installThe claude-code caskYes, with brew uninstall --cask
Settings, CLAUDE.md, agents, skills, commands~/.claudeKeep what you wrote
Session history~/.claude/projectsYes if you don’t need the transcripts; can be large
Account and app state~/.claude.jsonYes; signing in again recreates it
Project files.claude/, CLAUDE.md, .mcp.json in your reposKeep; they’re part of your projects
Sign-in tokenKeychain item Claude Code-credentialsYes

How to do it yourself

1. Remove the program

Find out how it was installed with which claude, then use the matching command.

# Native install (the default)
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

# npm
npm uninstall -g @anthropic-ai/claude-code

# Homebrew
brew uninstall --cask claude-code

If you used more than one method over time, which -a claude lists every copy. Remove the extra ones, or an old version stays first on your PATH.

2. Decide what to keep in ~/.claude

This folder is yours rather than the program’s. Look before you delete:

du -sh ~/.claude/* | sort -h

To remove everything, including your history:

rm -rf ~/.claude
rm -f ~/.claude.json
rm -rf ~/Library/Caches/claude-cli-nodejs ~/Library/Logs/claude-cli-nodejs

The last line is only needed if those folders exist. Check first with ls ~/Library/Caches | grep -i claude.

3. Remove the sign-in

Claude Code stores its login in the Keychain. Open Keychain Access, search for Claude Code-credentials and delete it. Or use Terminal:

security delete-generic-password -s "Claude Code-credentials"

You can also sign out first with /logout inside a session, and revoke access in your Anthropic account settings if you want to be thorough.

4. Clean up your projects and shell

Each repo you used it in may have a .claude folder (project settings, and sometimes .claude/worktrees), a CLAUDE.md and a .mcp.json. These are part of your project, so leave them unless you want them out of version control. Git worktrees that Claude Code created can be large, and How to remove Git worktrees shows how to clear them properly with git worktree remove.

Finally, delete any alias claude=… or PATH lines you added to ~/.zshrc.

How Levo does it

Claude Code is one of the agents Levo can use as its brain. Levo doesn’t need it: monitoring, notifications, the live index and the built-in rules all keep working with no agent connected, and you can connect another one such as Codex or Gemini. See Levo without an agent.

The Ready to free list shows agent sessions and worktrees as their own group, with sizes and reasons. Levo never cleans a live agent session, or git work that isn’t clean and merged, so you can clear old transcripts and worktrees without removing the tool. To remove the program and its settings folder, the commands above are the way, since they’re a CLI rather than an app. See Agent sessions in Levo.

FAQ

Where does Claude Code keep my settings and history?

In ~/.claude, with account state in ~/.claude.json. Session transcripts are in ~/.claude/projects, and your instructions and settings are CLAUDE.md and settings.json in the same folder.

Does uninstalling Claude Code delete my sessions?

No. Removing the program leaves ~/.claude in place. Delete the folder yourself if you want the history and settings gone.

How do I remove it if I installed it with npm?

Run npm uninstall -g @anthropic-ai/claude-code. If which claude still finds a copy afterwards, it came from another install method, such as the native one in ~/.local/bin.

Is it safe to delete ~/.claude?

Yes, but it deletes your CLAUDE.md, settings, custom agents and skills along with the history. Copy the ones you wrote first.