Last verified

How to uninstall Claude Code?

3 Steps · match your install route
  1. Remove using the route you installed with. Native on macOS, Linux or WSL: rm -f ~/.local/bin/claude then rm -rf ~/.local/share/claude. Homebrew: brew uninstall --cask claude-code. WinGet: winget uninstall Anthropic.ClaudeCode.
  2. Check that it's gone — run claude --version in a new terminal. If it still answers, you have a second installation or a shell alias left by an older installer.
  3. Clear your own data if you want it gone. The commands above remove the program, not ~/.claude/ — settings, and session transcripts kept in plaintext.
Native (Win) Remove-Item.local\bin + share
Homebrew brew uninstall--cask
WinGet winget uninstallAnthropic.ClaudeCode
Leaves behind ~/.claudetranscripts
§ 01 / SOURCE

Where this answer comes from.

Methodology →
PER VENDOR DOCS · AUG 01, 2026

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.

Native path: ~/.local/bin + shareHomebrew: brew uninstall --caskWinGet: winget uninstallCommon surprise: second install or aliasNot removed: ~/.claude (transcripts)Uninstall executed: no — see text
!
Per vendor docs — we did not run this test. The answer above rests on the source below, read on . Where we run a capability ourselves, this section carries the terminal transcript instead.
Source Anthropic docs — Setup, "Uninstall Claude Code" https://code.claude.com/docs/en/setup
§ 02 / WHY

Getting it fully gone.

2.1
Match the route, or you'll remove nothing

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.

2.2
When it survives the uninstall

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.

2.3
Removing the program is not removing your history

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.

Frequently asked.

Quick follow-ups people search after this question.

Q · 01 What's the command to uninstall Claude Code? +
It depends on how you installed it. Native: delete ~/.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? +
Almost always a second installation from another route, or a shell alias left by an older installer. Check which -a claude and your shell profile; Anthropic's install troubleshooting has a section on conflicting installations.
Q · 03 Does uninstalling delete my conversations? +
No. The documented commands remove the program from ~/.local; your settings and session transcripts live in ~/.claude/ and stay. Delete that directory too if clearing history is the point.
Q · 04 Do I need to cancel my subscription separately? +
Yes. Removing the CLI has no effect on billing — Claude Code is included in a Claude plan rather than sold separately, so the subscription continues until you cancel it in your account.