Find how Claude Code was installed with which -a claude, then use the matching removal: rm the native install at ~/.local/bin/claude and ~/.local/share/claude, npm uninstall -g @anthropic-ai/claude-code, brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode, or your Linux package manager. Configuration lives separately in ~/.claude and ~/.claude.json and is shared with the desktop app and IDE extensions.
- Run
which -a claudefirst. More than one result is normal and is why it survives. - Native install: delete
~/.local/bin/claudeand~/.local/share/claude. - npm:
npm uninstall -g @anthropic-ai/claude-code. Never with sudo. - Homebrew has two casks. Uninstall the one you installed.
- Config in
~/.claudeis shared with Desktop and the IDE extensions, and gets recreated.
First, find out how it got installed
Do not skip this. The removal command is different for each install method, and a machine that has been in use for a while frequently has two: an original npm install and a later native one, or a Homebrew cask sitting next to both. Uninstalling one and finding claude still on your PATH is the single most common outcome of guessing.
# every claude on your PATH, in resolution order
which -a claude
# the native installer puts a symlink here, into ~/.local/share/claude/versions/
ls -la ~/.local/bin/claude
# a legacy local npm install, created by older versions
ls -la ~/.claude/local/
# a global npm install
npm -g ls @anthropic-ai/claude-code 2>/dev/null
# a Homebrew cask, and which one
brew list --cask 2>/dev/null | grep claude
where.exe claude
Test-Path "$env:USERPROFILE\.local\bin\claude.exe"
winget list Anthropic.ClaudeCode
npm -g ls @anthropic-ai/claude-code
Match what you found to the section you need.
| What you found | Install method | Go to |
|---|---|---|
~/.local/bin/claude symlinked into ~/.local/share/claude/versions/ | Native installer | Native |
A package listed by npm -g ls | Global npm | npm |
~/.claude/local/ exists | Legacy local npm | Legacy local |
claude-code or claude-code@latest in brew list --cask | Homebrew | Homebrew |
winget list shows Anthropic.ClaudeCode | WinGet | WinGet |
dpkg -l claude-code or equivalent | apt / dnf / apk | Linux packages |
| Nothing, but the Claude app is installed | Bundled with the desktop app | Desktop app |
Native installer
This is the default install on every platform and the most likely answer. Two paths: the launcher and the versions directory.
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
Deleting only the launcher leaves several hundred megabytes of downloaded versions behind, which is worth knowing if you are doing this to reclaim disk. Deleting only the versions directory leaves a dangling symlink that reports a confusing error rather than command not found.
npm, and the legacy local install
npm uninstall -g @anthropic-ai/claude-code
Older versions of Claude Code created a second, local npm install under ~/.claude/local/. It is not removed by the global uninstall and it is a frequent cause of a claude that survives everything else.
# macOS and Linux
rm -rf ~/.claude/local
# Windows PowerShell
# Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
Homebrew, WinGet, and Linux packages
Homebrew
Homebrew publishes two casks: claude-code tracks the stable channel and claude-code@latest tracks the latest one. Uninstall the one you actually installed; running the wrong name reports that the cask is not installed and leaves the binary in place.
# stable cask
brew uninstall --cask claude-code
# latest cask
brew uninstall --cask claude-code@latest
# Homebrew keeps old versions around; reclaim the space
brew cleanup
WinGet
winget uninstall Anthropic.ClaudeCode
apt, dnf, and apk
Remove the package and the repository configuration, otherwise your next system update re-offers it.
sudo apt remove claude-code
sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
sudo dnf remove claude-code
sudo rm /etc/yum.repos.d/claude-code.repo
apk del claude-code
sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories
rm /etc/apk/keys/claude-code.rsa.pub
Uninstalling the desktop app
The desktop app bundles Claude Code, so removing the CLI does not remove the app, and removing the app does not remove a separately installed CLI. They are two things.
| Platform | How |
|---|---|
| macOS | Quit Claude, then move it from Applications to the Trash |
| Windows | Settings, Apps, Installed apps, Claude, Uninstall |
| Linux | sudo apt remove claude-desktop |
On Linux, removing the package also removes the repository entry and signing key that the package registered. A repository line you added by hand during install has to go separately.
sudo apt remove claude-desktop
sudo rm /etc/apt/sources.list.d/claude-desktop.list
It still runs after uninstalling
Almost always one of four things, in this order of likelihood.
- A second installation. Run
which -a claudeagain. It lists every match on your PATH, not just the winner. Remove the others with their own method. - A shell alias or function left behind by an older installer.
type claudetells you if the name resolves to an alias rather than a file, and the definition is somewhere in~/.zshrc,~/.bashrc, or~/.zprofile. - The shell is caching the old path.
hash -rin bash or zsh clears the command lookup table. Opening a new terminal does the same thing. - A custom launcher you or a tool created at
~/.local/bin/claude. Since v2.1.207 the updater leaves a launcher it did not create in place rather than replacing it, so a script there survives an uninstall that only targeted the versions directory.
which -a claude
type claude
hash -r
command -v claude || echo "gone"
Questions people ask
Run which -a claude to find how it was installed. For the standard native install, rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. For Homebrew, brew uninstall --cask claude-code. For npm, npm uninstall -g @anthropic-ai/claude-code.
npm uninstall -g @anthropic-ai/claude-code. Do not run it with sudo. Older versions also created a local install at ~/.claude/local, which the global uninstall does not touch.
brew uninstall --cask claude-code for the stable cask, or brew uninstall --cask claude-code@latest if you installed that one. Follow with brew cleanup, because Homebrew keeps old versions on disk.
For the native install, remove %USERPROFILE%\.local\bin\claude.exe and %USERPROFILE%\.local\share\claude. For WinGet, winget uninstall Anthropic.ClaudeCode. For npm, npm uninstall -g @anthropic-ai/claude-code.
You almost certainly have a second installation. Run which -a claude, which lists every match on your PATH rather than only the one that wins. A leftover shell alias and a cached command lookup are the other two causes; hash -r or a new terminal clears the cache.
No. Those live in ~/.claude and ~/.claude.json and survive the uninstall. Delete them separately, and remove the desktop app and IDE extensions first, because they write to the same directory and will recreate it.
On macOS quit it and move Claude from Applications to the Trash. On Windows use Settings, Apps, Installed apps. On Linux run sudo apt remove claude-desktop, which also removes the repository entry it registered.
No. Removing the software has no effect on billing. Cancel the plan in your Claude account settings if that is what you want.
Sources
Every figure above was read from these pages on August 2026. Vendors reprice without notice; if you find a stale number, tell us.
- Claude Code advanced setup official uninstall commands per install method
- Troubleshoot installation and login checking for conflicting installations
- Claude Code CLI reference claude project purge