{
"$type": "site.standard.document",
"bskyPostRef": {
"cid": "bafyreiehojput5yd565og2gmjyhql3pdib6qckh2owdcffzwob5smqyqbm",
"uri": "at://did:plc:ws6dhxzqnqxu5aqxt4kd27oc/app.bsky.feed.post/3mkgwdzhgidd2"
},
"coverImage": {
"$type": "blob",
"ref": {
"$link": "bafkreibw5jutbf2ml3xgfwde67ipa77tzsy6wdedhvt7bxf6wy5dd6amze"
},
"mimeType": "image/jpeg",
"size": 49989
},
"description": "Pick the right removal path for your install method, then wipe configuration files only if you want a fully fresh start.",
"path": "/how-to-uninstall-claude-code-cleanly-on-mac-windows-and-linux/",
"publishedAt": "2026-04-27T01:31:41.000Z",
"site": "https://allthings.how",
"tags": [
"@anthropic-ai"
],
"textContent": "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.\n\n**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.\n\nâ ď¸\n\nDeleting ~/.claude and ~/.claude.json wipes your settings, MCP server configs, allowed tools, and session history. Back them up first if you plan to reinstall later.\n\n* * *\n\n### Identify your install method first\n\nBefore you remove anything, confirm how Claude Code was installed. The path returned tells you which uninstall procedure to follow.\n\n\n claude --version\n which claude # macOS, Linux, WSL\n where.exe claude # Windows\n\n\nCheck version and install location\n\nA 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`.\n\n* * *\n\n### Uninstall by install method\n\nInstall method| Uninstall command\n---|---\nNative (macOS, Linux, WSL)| `rm -f ~/.local/bin/claude && rm -rf ~/.local/share/claude`\nNative (Windows)| Use Add/Remove Programs, or delete `claude.exe` from `%LOCALAPPDATA%\\Claude`\nHomebrew (stable)| `brew uninstall --cask claude-code`\nHomebrew (latest)| `brew uninstall --cask claude-code@latest`\nWinGet| `winget uninstall Anthropic.ClaudeCode`\napt (Debian, Ubuntu)| `sudo apt remove claude-code`\ndnf (Fedora, RHEL)| `sudo dnf remove claude-code`\napk (Alpine)| `sudo apk del claude-code`\nnpm (global)| `npm uninstall -g @anthropic-ai/claude-code`\n\n* * *\n\n### Native installer removal\n\nThe native installer drops a single binary into your local bin directory and supporting files into the share directory. Removing both clears the install entirely.\n\n**Step 1:** Delete the executable. On macOS, Linux, or WSL, run `rm -f ~/.local/bin/claude`. This removes the command from your shell PATH.\n\n**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.\n\n**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.\n\n* * *\n\n### Homebrew, WinGet, and Linux package managers\n\nPackage-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.\n\nFor 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.\n\nWinGet handles removal in one command from PowerShell or CMD: `winget uninstall Anthropic.ClaudeCode`.\n\nFor Debian and Ubuntu installs, also remove the repository configuration so future `apt update` runs don't reach for Anthropic's signed repo:\n\n\n sudo apt remove claude-code\n sudo rm /etc/apt/sources.list.d/claude-code.list \\\n /etc/apt/keyrings/claude-code.asc\n\n\nFull apt removal including repo config\n\nEquivalent cleanup applies for dnf (remove the repo file under `/etc/yum.repos.d/`) and apk (remove the repository line from `/etc/apk/repositories`).\n\n* * *\n\n### npm global package removal\n\nThe 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.\n\n\n npm uninstall -g @anthropic-ai/claude-code\n\n\nRemove global npm install\n\nIf 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.\n\n* * *\n\n### Remove configuration and cached data\n\nThe 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.\n\n\n rm -rf ~/.claude\n rm -f ~/.claude.json\n rm -rf ~/.cache/claude # optional cache cleanup\n\n\nWipe user settings and state (macOS, Linux, WSL)\n\n\n Remove-Item -Path \"$env:USERPROFILE\\.claude\" -Recurse -Force\n Remove-Item -Path \"$env:USERPROFILE\\.claude.json\" -Force\n\n\nWipe user settings on Windows\n\nProject-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:\n\n\n find ~ \\( -name \".claude\" -o -name \"CLAUDE.md\" \\) -print\n\n\nFind leftover project artifacts\n\nđ\n\nThe VS Code extension, the JetBrains plugin, and the Claude Desktop app all write to ~/.claude/. If any of them are still installed, the directory will be recreated the next time they run. Uninstall those integrations first if you want the deletion to stick.\n\n* * *\n\n### Verify the removal worked\n\nOpen a new terminal session so the shell rehashes its PATH cache, then check that `claude` is gone.\n\n\n which claude\n claude --version\n\n\nConfirm uninstall\n\nA 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.\n\n* * *\n\n### Common reasons uninstall appears to fail\n\nSymptom| Cause and fix\n---|---\n`claude` still runs after uninstall| A second install exists from a different method. Run `which -a claude` and remove each path.\n`~/.claude` reappears| VS Code extension, JetBrains plugin, or Claude Desktop is still installed and recreating it.\n`claude update` stuck in a loop| Indicates a broken install. A full removal followed by a fresh install resolves it.\nPermission errors during npm uninstall| Don't use `sudo`. Fix npm prefix permissions or reinstall npm with a user-writable prefix.\n\nOnce `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.",
"title": "How to Uninstall Claude Code Cleanly on Mac, Windows, and Linux",
"updatedAt": "2026-04-27T01:31:43.244Z"
}