Whether you’re troubleshooting, switching machines, or just done with Claude Code for now, uninstalling it is straightforward once you know which method you used to install it.
This guide covers every install method and how to remove configuration files if you want a complete clean wipe.
This is part of our complete Claude Code Beginner’s Guide.
TL;DR
- Uninstall depends on how you installed: native installer, Homebrew, WinGet, apt/dnf/apk, or npm
- Removing the binary is the main step — Claude Code won’t run after that
- Configuration files are separate and optional to remove
- If
claudestill works after uninstalling, you likely have a second installation somewhere
Step 1: Find Out How You Installed Claude Code
The uninstall command depends on your install method. If you’re not sure, run:
# Find out where your claude binary lives
which claude
~/.local/bin/claude→ Native installer/opt/homebrew/...or/usr/local/...→ Homebrew/usr/bin/claudeor/usr/local/bin/claudefrom a package → apt, dnf, or apk- Output from
npm bin -g→ npm - On Windows, checking the installed apps list → WinGet
Uninstall: Native Installer
Mac and Linux
Run these two commands to remove the Claude Code binary and version files:
# Remove the Claude Code launcher
rm -f ~/.local/bin/claude
# Remove all Claude Code version files
rm -rf ~/.local/share/claude
Open a new terminal and run claude. You should see command not found. That confirms the binary is gone.
Windows (PowerShell)
# Remove the Claude Code executable
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
# Remove Claude Code version files
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
Uninstall: Homebrew
If you installed the stable cask:
# Uninstall the stable Homebrew cask
brew uninstall --cask claude-code
If you installed the latest cask:
# Uninstall the latest Homebrew cask
brew uninstall --cask claude-code@latest
To confirm it’s gone:
# Should return 'claude not found' or an error
which claude
Uninstall: WinGet (Windows)
Open PowerShell and run:
# Uninstall Claude Code via WinGet
winget uninstall Anthropic.ClaudeCode
Uninstall: apt (Ubuntu and Debian)
Remove the package and its repository configuration:
# Remove the Claude Code package
sudo apt remove claude-code
# Remove the repository and signing key
sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
Run sudo apt update afterward to refresh the package list without the Claude Code repository.
Uninstall: dnf (Fedora and RHEL)
# Remove the Claude Code package
sudo dnf remove claude-code
# Remove the repository configuration file
sudo rm /etc/yum.repos.d/claude-code.repo
Uninstall: apk (Alpine Linux)
# Remove the Claude Code package
apk del claude-code
# Remove the repository entry and signing key
sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories
rm /etc/apk/keys/claude-code.rsa.pub
Uninstall: npm
# Remove the global Claude Code npm package
npm uninstall -g @anthropic-ai/claude-code
Step 2: Remove Configuration Files (Optional)
Removing the binary stops Claude Code from running, but it leaves behind your settings, conversation history, and MCP server configurations. If you want a complete clean removal, delete these as well.
⚠️ Warning: Deleting configuration files permanently removes all your Claude Code settings, MCP server configurations, allowed tool lists, and session history. Only do this if you want a complete reset or are uninstalling permanently.
Also note: if you have the VS Code extension, JetBrains plugin, or Desktop app still installed, they will recreate the ~/.claude/ directory the next time they run. Uninstall those first if you want the removal to stick.
Mac and Linux
# Remove user settings and session state
rm -rf ~/.claude
rm -f ~/.claude.json
# Remove project-level settings (run from your project directory)
rm -rf .claude
rm -f .mcp.json
Windows (PowerShell)
# Remove user settings and session state
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
# Remove project-level settings (run from your project directory)
Remove-Item -Path ".claude" -Recurse -Force
Remove-Item -Path ".mcp.json" -Force
“Claude Still Works” After Uninstalling — What’s Happening?
If you removed Claude Code but claude still runs, you have a second installation somewhere. Run:
# Find all locations where a 'claude' binary exists
which -a claude
On Windows PowerShell:
# Find all claude executables in your PATH
Get-Command claude -All
This will list every claude binary on your system. The extra one might be from an old npm install, a Homebrew version, or a leftover from a previous native install in a different location. Remove each one you find.
Canceling Your Anthropic Subscription
Uninstalling Claude Code from your computer doesn’t cancel your Anthropic subscription. If you want to stop being charged:
- Go to claude.ai in your browser
- Click your profile icon → Settings
- Go to Billing and cancel your plan
Uninstalling the software and canceling the subscription are two separate actions. Do both if you’re done with Claude Code entirely.
Key Takeaways
- The uninstall command depends on how you installed Claude Code — check with
which claudeif unsure - Removing the binary is enough to stop Claude Code from running
- Configuration files in
~/.claude/are separate and optional to delete - If
claudestill runs after uninstalling, you have a second installation — find it withwhich -a claude - Uninstalling doesn’t cancel your Anthropic subscription — do that separately at claude.ai
Next Steps
- Reinstall if needed**: How to Install Claude Code on Mac, How to Install Claude Code on Windows, or How to Install Claude Code on Linux
- Having other problems?**: Claude Code Login Problems — How to Fix Them
- Back to the beginning**: Return to the Claude Code Beginner’s Guide for the full learning path.