Asset 20 8 2
Does AI recommend your business? Run the free check →

Join 15,000 business owners, marketers and entrepreneurs. The Sunday newsletter you'll be annoyed only arrives once a week.

Article

How to Uninstall Claude Code Cleanly (And Stop It Coming Back)

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 brew command, it's Homebrew. Note whether you used claude-code or claude-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/claude
  • rm -rf ~/.local/share/claude

Native installer on Windows PowerShell

  • Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
  • Remove-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.

Work with me

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, then sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
  • dnf: sudo dnf remove claude-code, then sudo rm /etc/yum.repos.d/claude-code.repo
  • apk: apk del claude-code, then sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories and rm /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 ~/.claude and rm ~/.claude.json
  • Project settings, run from inside each project folder: rm -rf .claude and rm -f .mcp.json

On Windows PowerShell

  • User settings and state: Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force and Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
  • Project settings, run from inside each project folder: Remove-Item -Path ".claude" -Recurse -Force and Remove-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.

Published and maintained by the Lilach Bullock team, covering marketing, AI and business growth.
Your buyers are asking AI who to use. Does it say you?

See for free whether ChatGPT, Claude, Perplexity, Gemini and Google name you, and get the plan to become the answer.

Check my AI visibility →
Sundays only

Get the Sunday newsletter.

One email a week. AI experiments, marketing tactics, and the workflows Lilach is building right now in her own business.

Subscribe free

Let’s get your marketing running on AI.

Book a free 30-minute call

We figure out what you need, where AI fits in, and what working together would look like.

Book the call →

Or take the 30-second calculator

You’ll see the hours and the money quietly leaking out of your week, and the three workflows worth building first.

Take the calculator →

Or grab the free AI resource library

Prompt packs, templates, checklists, and swipe files. The exact tools I build for paying clients. Yours, free.

Get the library →
Keep reading

More from the blog.