Removing Claude Code cleanly depends on how you installed it. The native installer, Homebrew, WinGet, Linux package managers, and npm each leave files in different places, and the configuration directory at ~/.claude persists separately from the binary itself. Running the wrong uninstall command for your install type is the most common reason people end up with a half-removed install.
Quick answer: Run which claude (or where.exe claude on Windows) to find the binary path, remove it with the matching uninstall command for your install method, then optionally delete ~/.claude and ~/.claude.json to clear settings.
Identify your install method first
Before you remove anything, confirm how Claude Code was installed. The path returned tells you which uninstall procedure to follow.
claude --version
which claude # macOS, Linux, WSL
where.exe claude # Windows
Check version and install location
A path under ~/.local/bin/claude means the native installer. A path containing node_modules or an npm prefix points to the npm package. Homebrew installs land under /opt/homebrew or /usr/local, and WinGet installs sit under AppData\Local.
Uninstall by install method
| Install method | Uninstall command |
|---|---|
| Native (macOS, Linux, WSL) | rm -f ~/.local/bin/claude && rm -rf ~/.local/share/claude |
| Native (Windows) | Use Add/Remove Programs, or delete claude.exe from %LOCALAPPDATA%\Claude |
| Homebrew (stable) | brew uninstall --cask claude-code |
| Homebrew (latest) | brew uninstall --cask claude-code@latest |
| WinGet | winget uninstall Anthropic.ClaudeCode |
| apt (Debian, Ubuntu) | sudo apt remove claude-code |
| dnf (Fedora, RHEL) | sudo dnf remove claude-code |
| apk (Alpine) | sudo apk del claude-code |
| npm (global) | npm uninstall -g @anthropic-ai/claude-code |
Native installer removal
The native installer drops a single binary into your local bin directory and supporting files into the share directory. Removing both clears the install entirely.
Step 1: Delete the executable. On macOS, Linux, or WSL, run rm -f ~/.local/bin/claude. This removes the command from your shell PATH.
Step 2: Remove the installation directory with rm -rf ~/.local/share/claude. This clears the binary's version metadata and any auxiliary files the installer placed there.
Step 3: On Windows, locate the executable using where.exe claude in PowerShell, then remove it with Remove-Item -Path "$env:LOCALAPPDATA\Claude\claude.exe" -Force, adjusting the path if it differs on your machine. You can also uninstall through Settings → Apps.
Homebrew, WinGet, and Linux package managers
Package-managed installs are the cleanest to remove because the manager tracks every file it placed. Pick the command that matches the cask or repository you used.
For Homebrew, the cask name depends on the channel you installed. Stable users run brew uninstall --cask claude-code, while rolling users run brew uninstall --cask claude-code@latest. Follow up with brew cleanup to reclaim disk space from older versions Homebrew kept on disk.
WinGet handles removal in one command from PowerShell or CMD: winget uninstall Anthropic.ClaudeCode.
For Debian and Ubuntu installs, also remove the repository configuration so future apt update runs don't reach for Anthropic's signed repo:
sudo apt remove claude-code
sudo rm /etc/apt/sources.list.d/claude-code.list \
/etc/apt/keyrings/claude-code.asc
Full apt removal including repo config
Equivalent cleanup applies for dnf (remove the repo file under /etc/yum.repos.d/) and apk (remove the repository line from /etc/apk/repositories).
npm global package removal
The global npm package places the binary in your npm prefix and links it via a postinstall script. Uninstall it the same way you installed it.
npm uninstall -g @anthropic-ai/claude-code
Remove global npm install
If you used an alternative runtime like Bun, run its equivalent uninstall and then check for stray symlinks under your npm or Bun bin directory. A leftover claude symlink in ~/.npm-global/bin or ~/.bun/bin is a frequent cause of claude still resolving after uninstall.
Remove configuration and cached data
The uninstall steps above leave your settings intact on purpose, so a future reinstall picks up where you left off. To wipe everything, delete the configuration directory and JSON file in your home folder.
rm -rf ~/.claude
rm -f ~/.claude.json
rm -rf ~/.cache/claude # optional cache cleanup
Wipe user settings and state (macOS, Linux, WSL)
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
Wipe user settings on Windows
Project-level settings live alongside your code. From inside a project directory, run rm -rf .claude and rm -f .mcp.json to remove them. To find every project folder that still has Claude artifacts, search recursively from your home directory:
find ~ \( -name ".claude" -o -name "CLAUDE.md" \) -print
Find leftover project artifacts
Verify the removal worked
Open a new terminal session so the shell rehashes its PATH cache, then check that claude is gone.
which claude
claude --version
Confirm uninstall
A successful removal returns claude not found from which and command not found: claude from your shell when you try to run it. If the command still resolves, run which -a claude to list every matching binary on PATH and remove the leftovers.
Common reasons uninstall appears to fail
| Symptom | Cause and fix |
|---|---|
claude still runs after uninstall | A second install exists from a different method. Run which -a claude and remove each path. |
~/.claude reappears | VS Code extension, JetBrains plugin, or Claude Desktop is still installed and recreating it. |
claude update stuck in a loop | Indicates a broken install. A full removal followed by a fresh install resolves it. |
| Permission errors during npm uninstall | Don't use sudo. Fix npm prefix permissions or reinstall npm with a user-writable prefix. |
Once claude --version reports the command is missing and your home directory no longer contains .claude or .claude.json, the removal is complete. Reinstalling later starts from a clean slate, with a fresh login flow and no inherited settings.