To uninstall Claude Code, run the removal command for the way you installed it: delete the binary and version files for a native install, or use Homebrew, WinGet, apt, dnf, apk or npm to remove the package. Your settings stay behind unless you delete the .claude folder too. If claude still runs afterwards, you've got a second install or an old alias.
If claude still runs after you remove it
I'm starting with the problem most people search for after they've already tried. You ran an uninstall command, you typed claude to check, and it still opened. That's not the uninstall failing. According to Anthropic's setup docs, it almost always means one of two things: you've got a second installation you'd forgotten about, or there's a leftover shell alias from an older installer still pointing somewhere.
This is common because people install Claude Code one way, hit a snag, follow a different guide, and install it again another way. Each route puts its own copy in its own place. Removing one leaves the other untouched, and your shell happily runs whichever it finds first.
So the order that saves the most time is: work out every way you've installed it, remove each one, then check for an alias in your shell's startup file. Only after all that should you decide whether to delete your settings.
First, work out how you installed it
Run claude doctor before you remove anything. It prints read-only installation and settings diagnostics without starting a session, including install health, and it'll flag a launcher the native installer didn't create. That alone often explains a stubborn second copy.
Then use these clues:
- If you pasted a one-line install command from Anthropic's site, you used the native installer. On macOS and Linux it puts a launcher at
~/.local/bin/claude. - If you typed a
brewcommand, it's Homebrew. Note whether you usedclaude-codeorclaude-code@latest, because they're separate casks. - If you're on Windows and used
winget, it's WinGet. - If you added a repository and used apt, dnf or apk on Linux, it's a Linux package manager install.
- If you ran
npm install -g, it's the npm package.
More than one of those ring a bell? Then you've found your second install. Remove both.
Removal commands by install type
I've put these in the order most people need them, with the native installer first because it's the default route in my Claude Code install guide.
Native installer on macOS, Linux or WSL
Remove the Claude Code binary and version files:
rm -f ~/.local/bin/clauderm -rf ~/.local/share/claude
Native installer on Windows PowerShell
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -ForceRemove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
Homebrew
Remove the cask you installed. For the stable cask, run brew uninstall --cask claude-code. For the latest cask, run brew uninstall --cask claude-code@latest. If you're not sure which, running both won't hurt; the one you don't have will just tell you so.
WinGet
Run winget uninstall Anthropic.ClaudeCode. Close any open Claude Code windows first, because Windows locks files that are in use.
Want AI doing the heavy lifting in your marketing?
I build the systems that handle the boring 80 percent, so you get your week back. Done properly, with the human kept in.
apt, dnf or apk
On Linux you remove the package and the repository configuration, so your package manager stops looking for updates to something that isn't there.
- apt:
sudo apt remove claude-code, thensudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc - dnf:
sudo dnf remove claude-code, thensudo rm /etc/yum.repos.d/claude-code.repo - apk:
apk del claude-code, thensed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositoriesandrm /etc/apk/keys/claude-code.rsa.pub
npm
Remove the global package with npm uninstall -g @anthropic-ai/claude-code.
When you've run every command that applies, open a brand new terminal window and type claude again. A new window matters, because an old one can still remember where the program was. If it's gone, you're done with the program itself. If it still runs, go back to the clues list: there's another install, or an alias in your shell startup file that you'll want to delete.
Wiping settings and history too
Removing the program doesn't remove your configuration. That's deliberate, and for a lot of people it's the right outcome: if you're reinstalling to fix a broken setup or switching install method, keeping your settings means you pick up exactly where you left off.
Deleting the configuration files is a bigger step. It wipes all your settings, your allowed tools, your MCP server configurations and your session history. If you spent time connecting tools, like the setups in my guide to Claude Code and MCP, that work goes with it.
There's also a trap here. The VS Code extension, the JetBrains plugin and the Desktop app all write to ~/.claude/ as well. If any of them is still installed, the folder comes back the next time it runs. So to remove Claude Code completely, uninstall the VS Code extension, the JetBrains plugin and the Desktop app first, then delete the files.
On macOS, Linux or WSL
- User settings and state:
rm -rf ~/.claudeandrm ~/.claude.json - Project settings, run from inside each project folder:
rm -rf .claudeandrm -f .mcp.json
On Windows PowerShell
- User settings and state:
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -ForceandRemove-Item -Path "$env:USERPROFILE\.claude.json" -Force - Project settings, run from inside each project folder:
Remove-Item -Path ".claude" -Recurse -ForceandRemove-Item -Path ".mcp.json" -Force
Be careful with the project commands. They delete Claude Code's settings for that project, and a project's .claude folder or .mcp.json file may be shared with colleagues through your code repository. Check before you delete something your team relies on.
What I'd do before deleting anything
If you're uninstalling because something's broken, I wouldn't wipe your settings on the first attempt. Remove the program, reinstall it one way only, and see if the problem goes. Very often the cause is two installs fighting each other, and a clean single install sorts it without losing your setup.
If you're leaving for good, copy your ~/.claude folder somewhere safe before you delete it. It takes seconds and it means you can bring back your allowed tools and MCP settings if you change your mind. And if you're simply after a fresh start with better habits, my guide on how to use Claude Code is a sensible place to begin again.