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.

| What | Where | Safe to delete? |
|---|---|---|
| CLI link (native install) | ~/.local/bin/claude | Yes |
| Downloaded versions | ~/.local/share/claude | Yes |
| npm install | @anthropic-ai/claude-code in the global node_modules | Yes, with npm uninstall -g |
| Homebrew install | The claude-code cask | Yes, with brew uninstall --cask |
Settings, CLAUDE.md, agents, skills, commands | ~/.claude | Keep what you wrote |
| Session history | ~/.claude/projects | Yes if you don’t need the transcripts; can be large |
| Account and app state | ~/.claude.json | Yes; signing in again recreates it |
| Project files | .claude/, CLAUDE.md, .mcp.json in your repos | Keep; they’re part of your projects |
| Sign-in token | Keychain item Claude Code-credentials | Yes |
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
- Keep:
CLAUDE.md,settings.json, and theagents,skillsandcommandsfolders. They’re hand-written instructions you’d have to rewrite. Copy them somewhere safe if you might come back. - Usually large:
projects, which holds a JSON transcript for every session in every folder. How to clear Claude Code sessions explains what’s inside and what’s safe to prune. - Disposable: shell snapshots, caches, todos and statistics folders.
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.