How to uninstall Claude Code?
- Remove using the route you installed with. Native on macOS, Linux or WSL:
rm -f ~/.local/bin/claudethenrm -rf ~/.local/share/claude. Homebrew:brew uninstall --cask claude-code. WinGet:winget uninstall Anthropic.ClaudeCode. - Check that it's gone — run
claude --versionin a new terminal. If it still answers, you have a second installation or a shell alias left by an older installer. - Clear your own data if you want it gone. The commands above remove the program, not
~/.claude/— settings, and session transcripts kept in plaintext.
Four routes in means four routes out — and one thing none of them removes.
Anthropic's setup page gives a removal path per install method. Native installs delete the binary and version files: on macOS, Linux and WSL rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude; on Windows the PowerShell equivalents, Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force and Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force. Managed installs go through their manager: brew uninstall --cask claude-code (or the @latest cask if that's what you took), winget uninstall Anthropic.ClaudeCode, or your Linux package manager.
The docs also name the most common surprise: if claude still runs after all that, you likely have a second installation or a leftover shell alias from an older installer. Their troubleshooting page has a section for finding conflicting installations, and it's the first place to look rather than repeating the removal.
What none of those commands touch is your own data. They operate on ~/.local; your settings and session history live in ~/.claude/, and Claude Code keeps session transcripts there in plaintext for 30 days by default so sessions can be resumed. On this machine that directory held 50 project folders — we checked names and count only. If you're uninstalling for privacy rather than disk space, that folder is the point.
Scope: we quote the documented commands and did not run an uninstall — the binary in question is the one running this session.
Getting it fully gone.
Running brew uninstall against a native install does nothing at all, and vice versa. If you don't remember how you installed it, which claude (or where claude on Windows) tells you: a path under ~/.local/bin means the native installer, a Homebrew cellar path means brew, and a WinGet install sits under the Windows package paths.
Linux packages installed with apt, dnf or apk come out through the same package manager that put them in.
A claude command that still answers after removal almost always means one of two things: a second installation from a different route, or a shell alias or shim left behind by an older installer that points at a path you already deleted.
Check your shell profile for an alias, and check whether which -a claude reports more than one path. Anthropic's install troubleshooting has a dedicated section for exactly this.
Uninstalling leaves ~/.claude/ in place — settings, and session transcripts stored in plaintext. That's deliberate, so a reinstall picks up where you left off, and it's easy to miss if your reason for uninstalling was that the transcripts existed at all.
Delete the directory to clear it, or keep the tool and shorten the retention window with cleanupPeriodDays instead. Related: what Anthropic does with your code, which is a separate question from what's on your disk.
Two things to consider first.
Most uninstalls we've seen discussed are really about cost or a bad build, and both have a cheaper fix than removal.
Frequently asked.
Quick follow-ups people search after this question.
Q · 01 What's the command to uninstall Claude Code? +
~/.local/bin/claude and ~/.local/share/claude (PowerShell equivalents on Windows). Homebrew: brew uninstall --cask claude-code. WinGet: winget uninstall Anthropic.ClaudeCode.Q · 02 Claude still runs after I uninstalled it. Why? +
which -a claude and your shell profile; Anthropic's install troubleshooting has a section on conflicting installations.Q · 03 Does uninstalling delete my conversations? +
~/.local; your settings and session transcripts live in ~/.claude/ and stay. Delete that directory too if clearing history is the point.