GuidesRunning & maintaining

How to uninstall Claude Code (every install method)

Uninstall Claude Code on macOS, Linux and Windows: the exact command for native, Homebrew, npm, WinGet and apt, dnf or apk installs, and removing ~/.claude.

November 25, 2026The Everpod team
The short answer

Remove it the way it was installed. Native installer on macOS, Linux or WSL: rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. Homebrew: brew uninstall --cask claude-code (or claude-code@latest). npm: npm uninstall -g @anthropic-ai/claude-code. WinGet: winget uninstall Anthropic.ClaudeCode. apt, dnf and apk remove the claude-code package and then the repository file and key. That removes the program only: your settings, sign-in and session history stay in ~/.claude and ~/.claude.json until you delete them, and deleting them cannot be undone. Run /logout first if you want the stored login gone too.

Find out how it was installed

command -v claude                     # the copy your shell runs
ls -l ~/.local/bin/claude             # native: a symlink into ~/.local/share/claude/versions/
brew list --cask | grep claude-code   # Homebrew: prints the cask you have
npm -g ls @anthropic-ai/claude-code   # npm global install
Copied

The native installer keeps its launcher at ~/.local/bin/claude, a symlink into ~/.local/share/claude/versions/. A path under Homebrew’s prefix is a cask, and a path under a Node prefix is npm. On Debian, Ubuntu, Fedora, RHEL or Alpine, ask the package manager whether it holds a claude-code package (dpkg -s claude-code, rpm -q claude-code or apk info -e claude-code). Older versions of Claude Code also made a local npm install in ~/.claude/local/. On Windows, where.exe claude lists every copy on the PATH. More than one install can sit side by side, and each is removed by its own route.

Sign out first, if you want the login gone

Uninstalling does not sign you out. Where the login lives depends on the system, per Anthropic’s credential notes: on macOS it is in the Keychain (with ~/.claude/.credentials.json as a fallback when the Keychain refuses the write), on Linux in ~/.claude/.credentials.json, on Windows in %USERPROFILE%\.claude\.credentials.json. On a Mac the login is not in those folders, so the simplest course is to sign out while the program is still there:

/logout                # inside a Claude Code session
claude auth logout     # log out from your shell instead
Copied

In the troubleshooting docs’ words, logging out “removes all stored credentials, including the plaintext file’s contents, saved MCP server logins, and plugin sensitive values.” If you signed in to a Console account and let Claude Code create an API key for you, that key also sits in your Console: delete it there if you want it unusable. If you ran Claude Code with several accounts through CLAUDE_CONFIG_DIR, each directory has its own login, so log out of each.

Remove the program

Anthropic’s uninstall section gives one route per install method, as of November 2026:

Installed withRemove with
Native installer, macOS, Linux, WSL
rm -f ~/.local/bin/claude then rm -rf ~/.local/share/claude
Native installer, Windows
The two Remove-Item lines below
Homebrew, stable cask
brew uninstall --cask claude-code
Homebrew, latest cask
brew uninstall --cask claude-code@latest
WinGet
winget uninstall Anthropic.ClaudeCode
npm
npm uninstall -g @anthropic-ai/claude-code
apt, dnf, apk
The package, then the repository file and key, below

On native Windows, in PowerShell:

Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
Copied

A copy inside WSL is a separate Linux install: remove it from the WSL terminal with the Linux lines. The Windows guide covers how the two sit side by side.

The Linux packages add a repository as well as the package, and the docs remove both. For apt:

sudo apt remove claude-code
sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
Copied

For dnf:

sudo dnf remove claude-code
sudo rm /etc/yum.repos.d/claude-code.repo
Copied

For apk, as root:

apk del claude-code
sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories
rm /etc/apk/keys/claude-code.rsa.pub
Copied

Old installs: ~/.claude/local and a leftover alias

Older versions of Claude Code could install themselves as a local npm package in ~/.claude/local, and older installers added a claude alias to your shell file. Both outlive the uninstall commands above, and the docs name a second install or a leftover alias as the likely reason claude still runs afterwards. Remove the folder, then look for the alias in ~/.zshrc, ~/.bashrc, ~/.config/fish/config.fish and, on macOS, ~/.bash_profile, ~/.bash_login or ~/.profile:

rm -rf ~/.claude/local
grep -n "claude" ~/.zshrc ~/.bashrc ~/.bash_profile ~/.bash_login ~/.profile ~/.config/fish/config.fish 2>/dev/null
Copied

On Windows, in PowerShell, the old local install is:

Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local"
Copied

Delete any alias claude= line the search shows, and a PATH line you added yourself for ~/.local/bin only if nothing else you use lives there. Then open a new shell; the old one keeps the alias until it exits.

Remove your data, if you want it gone

Everything above leaves your data in place, so a reinstall picks up where you left off. Anthropic’s warning for the next step is plain: “Removing configuration files will delete all your settings, allowed tools, MCP server configurations, and session history.” There is no undo. If you want a copy of your transcripts, move ~/.claude/projects somewhere else first.

Uninstall the VS Code extension, the JetBrains plugin and the Claude Desktop app first (next section): each writes to ~/.claude/ and recreates it the next time it runs. Then:

# Optional, and permanent: there is no undo
rm -rf ~/.claude       # settings, CLAUDE.md, skills, plugins, transcripts, history, login file
rm ~/.claude.json      # account details, project trust, personal MCP servers, UI toggles
Copied

On Windows, in PowerShell:

# Optional, and permanent: there is no undo
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
Copied

If you set CLAUDE_CONFIG_DIR, both live under that directory instead, so delete it too. Two things sit outside these paths: pasted images and each session’s scratchpad are under the temp directory (on Linux, /tmp/claude-<uid>/), which your system can clear on its own, such as on restart. If you only want one project’s history gone and not everything, deleting Claude Code’s sessions and history covers claude purge, which needs the program, so run it before you uninstall.

Inside each project, Claude Code may have a .claude folder, a .mcp.json and a CLAUDE.md. These belong to the project, and in a shared repository they are often committed for the whole team, so leave them unless they are yours alone. Deleting them is optional, and permanent unless git holds a copy. To remove the folder and the file Anthropic’s uninstall steps name, from the project directory:

rm -rf .claude
rm -f .mcp.json
Copied

A CLAUDE.md is your own writing, so delete it by hand only if you want it gone. In a git repository, check git status afterwards: a committed file shows as deleted and goes for everyone at your next commit.

The editor extensions and the desktop app

The VS Code extension is removed in VS Code: open the Extensions view (Cmd+Shift+X on a Mac, Ctrl+Shift+X elsewhere), search for “Claude Code” and click Uninstall. It can come back. The VS Code page says it reinstalls if you run /ide from an outside terminal while VS Code is open, or start claude in the integrated terminal on a version before v2.1.318. If the CLI is staying, set autoInstallIdeExtension to false in ~/.claude.json or turn off Auto-install IDE extension in /config. The extension’s own data is in a separate folder:

rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code   # macOS
rm -rf ~/.config/Code/User/globalStorage/anthropic.claude-code                        # Linux
Copied
Remove-Item -Recurse -Force "$env:APPDATA\Code\User\globalStorage\anthropic.claude-code"
Copied

The JetBrains plugin comes off from the IDE’s Plugins settings, and the Claude Desktop app the way any app on your system does. On Windows, an older Desktop app can register its own Claude.exe that answers to claude, so a command that still opens something after the CLI is gone may be that.

Check nothing is left

hash -r; command -v claude     # prints nothing once it is gone
which -a claude                # every claude still on the PATH
type claude                    # names a leftover shell alias, if there is one
ls -d ~/.local/share/claude ~/.claude/local ~/.claude ~/.claude.json 2>/dev/null
Copied

If a claude is still found, it is a second install or an alias: remove it by its own route from the table above and check again. The last line prints whatever is still on disk, which after a program-only uninstall is your data folders, as intended. On Windows, where.exe claude prints INFO: Could not find files for the given pattern(s). when none is left. To put it back later, installing Claude Code has every route, and on a server, Claude Code on Linux covers the shell and PATH cases. To move to a different install method rather than remove Claude Code, see updating Claude Code, which covers switching from npm to the native installer.

Run Claude Code on an always-on developer pod.

A developer pod is a permanent cloud computer (VPS), set up and secured for you, with your pick of Claude Code, Codex, OpenCode, Pi, Hermes and OpenClaw installed. Run more agents at once than your laptop can hold, and keep them working when it’s closed. From $24 a month, built in about ten minutes.