Blog
3 min read

How to Uninstall Claude Code (Mac, Windows, Linux, npm, Homebrew)

Removing Claude Code depends on how you installed it: native installer, Homebrew, WinGet, apt/dnf, or npm. The exact commands for each, how to remove settings and history too, and what to do if claude still runs afterwards.

How you remove Claude Code depends on how you installed it. If you're not sure, run this first:

which claude        # macOS / Linux / WSL
where claude        # Windows Command Prompt

The path tells you which method you used:

Path contains Installed with
~/.local/bin/claude Native installer (the default)
/opt/homebrew/ or /usr/local/Cellar Homebrew
node_modules or an npm prefix npm
WinGet in the path WinGet
/usr/bin/claude apt, dnf or apk

Native installer (macOS, Linux, WSL)

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

Native installer (Windows PowerShell)

Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force

Homebrew

There are two casks. Remove whichever you installed:

brew uninstall --cask claude-code
# or
brew uninstall --cask claude-code@latest

WinGet

winget uninstall Anthropic.ClaudeCode

apt / dnf / apk (Linux packages)

# Debian / Ubuntu
sudo apt remove claude-code
sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc

# Fedora / RHEL
sudo dnf remove claude-code
sudo rm /etc/yum.repos.d/claude-code.repo

npm

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

If you used sudo to install it originally, you may need sudo to remove it — and that's a sign to switch to the native installer if you reinstall. (npm EACCES errors)

Removing your settings and history too

Uninstalling the program leaves your configuration behind: settings, permission rules, MCP servers, session history and auto memory. To remove that as well:

# macOS / Linux / WSL
rm -rf ~/.claude
rm ~/.claude.json
# Windows PowerShell
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

This is permanent. If you might come back, copy ~/.claude/ somewhere first — especially any CLAUDE.md, skills or custom settings you wrote.

Each project can also have its own files: a .claude/ folder and .mcp.json. These usually belong in the repository (your team may rely on them), so only delete them if they're yours alone.

The VS Code extension, JetBrains plugin and Desktop app also write to ~/.claude/. Uninstall those first, or the folder comes straight back the next time one of them runs.

"I uninstalled it but claude still runs"

You almost certainly have two installations — say, an old npm one and a newer native one. Check every copy on your PATH:

which -a claude

Remove each one using the matching method above. Also check your shell config (~/.zshrc, ~/.bashrc) for an old alias claude=... line from an earlier installer, and open a new terminal afterwards. (The PATH variable explained)

Reinstalling cleanly

If you're uninstalling because something is broken, try this before giving up:

claude doctor

It checks for duplicate installs, PATH problems and broken settings files, and can often fix them. If you do reinstall, the native installer is the recommended route and updates itself automatically. (How to install Claude Code, Claude Code troubleshooting)

The summary

  • Find how it was installed with which claude.
  • Use the matching command: rm for native, brew uninstall, winget uninstall, npm uninstall -g.
  • Delete ~/.claude and ~/.claude.json to remove settings and history (back them up first).
  • Still running? You have a second install — which -a claude.

EasySpawn runs Claude Code on a managed server you reach from any browser, so there's nothing to install, update or untangle on your own machine. See how it works or join the waitlist.

Related: How to Install Claude Code · How to Update Claude Code · Claude Code Not Working? · Claude Code on Windows

Keep reading