How to Uninstall Claude Code on Mac, Windows and Linux

Uninstall Claude Code with the right command for native, Homebrew, WinGet, npm or Linux installs, then remove ~/.claude, settings and the VS Code extension.

Josh Pocock6 min read

Uninstall Claude Code cover

AI Coding

Uninstall Claude Code

Stride AI Academy

To uninstall Claude Code, remove it the same way you installed it: delete the native binary, or run the uninstall command for Homebrew, WinGet, npm or your Linux package manager. That removes the program but leaves your settings, MCP servers and session history in ~/.claude and ~/.claude.json. Delete those too only if you want a clean slate, and uninstall the VS Code extension, JetBrains plugin and desktop app first, or they'll recreate the folder.

This guide gives the exact remove command for each install method, how to find a second copy that keeps running, how to delete your config and project files, and how to clear one project's data without uninstalling. Everything here was checked against the uninstall section of Claude Code's setup docs, the install troubleshooting docs, the .claude directory docs, the CLI reference and the VS Code docs on November 22, 2026.

Before you remove Claude Code

Three quick checks:

  1. Are you fixing a problem rather than leaving? A broken or stale install is usually fixed by updating Claude Code or removing a duplicate copy, not a full wipe.
  2. Do you want to keep anything? Your settings, custom skills, subagents and rules live in ~/.claude. Copy what you want before deleting it.
  3. Sign out first if you want your saved login gone too. Run claude auth logout while the claude command still exists. The authentication docs say credentials sit in the macOS Keychain on a Mac, and in .credentials.json inside ~/.claude on Linux and Windows.

How to uninstall Claude Code by install method

Not sure which method you used? The section on finding every copy, further down, shows how to check.

Native install on Mac, Linux or WSL

Terminal
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

The first line removes the launcher. The second removes the installed versions.

Native install on Windows

Run this in PowerShell:

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:

Terminal
brew uninstall --cask claude-code

For the latest cask:

Terminal
brew uninstall --cask claude-code@latest

WinGet

PowerShell
winget uninstall Anthropic.ClaudeCode

npm

Terminal
npm uninstall -g @anthropic-ai/claude-code

apt, dnf or apk

Remove the package and the repository it came from, so your system stops checking for updates.

On Debian or Ubuntu:

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

On Fedora or RHEL:

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

On Alpine:

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

Find every copy of Claude Code

If claude still runs after you uninstall, you have a second install or a leftover shell alias from an older installer. This is also the usual cause of an old version that won't go away.

On Mac or Linux, list every claude on your PATH:

Terminal
which -a claude

Then check the three places a copy can come from:

Terminal
ls -la ~/.local/bin/claude
ls -la ~/.claude/local/
npm -g ls @anthropic-ai/claude-code 2>/dev/null

The troubleshooting docs explain them. ~/.local/bin/claude is the native installer, ~/.claude/local/ is a legacy local npm install made by older versions, and the last command shows a global npm install. A "No such file or directory" message just means nothing is installed there.

On Windows PowerShell:

PowerShell
where.exe claude
Test-Path "$env:USERPROFILE\.local\bin\claude.exe"

To remove the legacy local npm install, run rm -rf ~/.claude/local on Mac or Linux, or this in PowerShell:

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

Remove Claude Code settings and data

Uninstalling leaves your configuration behind. The setup docs warn that deleting it removes all your settings, allowed tools, MCP server configurations and session history. It can't be undone.

Uninstall the editor and app versions first. The VS Code extension, the JetBrains plugin and the desktop app all write to ~/.claude, so if one is still installed, the folder comes back the next time it runs.

On Mac, Linux or WSL:

Terminal
# Remove user settings and state
rm -rf ~/.claude
rm ~/.claude.json

# Remove project-specific settings (run from your project directory)
rm -rf .claude
rm -f .mcp.json

On Windows PowerShell:

PowerShell
# Remove user settings and state
Remove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force

# Remove project-specific settings (run from your project directory)
Remove-Item -Path ".claude" -Recurse -Force
Remove-Item -Path ".mcp.json" -Force

What each one holds:

Path What's in it
~/.claude/ Your settings.json, personal skills, subagents, rules, keybindings, transcripts and auto memory
~/.claude.json Account details, personal MCP servers and per-project state
.claude/ in a project That project's shared settings, skills, subagents and rules
.mcp.json in a project That project's shared MCP servers
CLAUDE.md at a project's root Project instructions, which the commands above leave alone

Be careful with the project lines. A project's .claude folder and .mcp.json are often committed to Git and shared with your team. Deleting them in a shared repo removes them for everyone once you commit. If you only want Claude Code off your own machine, leave project files alone.

If you set CLAUDE_CONFIG_DIR to move the config folder, your settings live in that folder instead of ~/.claude. Delete that one.

Uninstall the Claude Code VS Code extension

From the VS Code docs:

  1. Press Cmd+Shift+X on Mac or Ctrl+Shift+X on Windows and Linux to open Extensions.
  2. Search for "Claude Code".
  3. Click Uninstall.

The extension comes back 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. For JetBrains, remove the Claude Code plugin from your IDE. Our guide to Claude Code in VS Code covers the extension itself.

Clear one project's data without uninstalling

If you only want to wipe what Claude Code saved about one project, you don't need to uninstall anything. Run:

Terminal
claude purge ~/work/my-repo --dry-run

The dry run prints the plan without deleting. Drop --dry-run to do it, and Claude Code asks you to confirm. Per the CLI reference and .claude directory docs, it deletes that project's transcripts and auto memory, task lists, debug logs, file-edit history, matching prompt history lines and the project's entry in ~/.claude.json. Run claude purge with no path to pick from a list, or pass --all for every project. Before v2.1.288 the command was claude project purge.

Reinstall Claude Code later

Coming back is one command. On Mac, Linux or WSL:

Terminal
curl -fsSL https://claude.ai/install.sh | bash

On Windows PowerShell:

PowerShell
irm https://claude.ai/install.ps1 | iex

Open a new terminal, run claude --version, then claude to sign in. If you kept ~/.claude, your settings and history are still there. Our guide to installing Claude Code covers the other methods and common install errors.

Learn to build with Claude Code

The Stride AI Coding course teaches Claude Code and Codex for building client tools, written for non-programmers, with weekly live calls to review your builds. Many of the free guides cover Claude Code setups, and the Claude Code community is where members compare theirs.

FAQ

How do I uninstall Claude Code?

Remove it the way you installed it. For a native install on Mac or Linux, run rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. Otherwise use brew uninstall --cask claude-code, winget uninstall Anthropic.ClaudeCode or npm uninstall -g @anthropic-ai/claude-code.

Does uninstalling Claude Code delete my settings?

No. Your settings, MCP servers and session history stay in ~/.claude and ~/.claude.json. Delete both to remove them, after uninstalling the VS Code extension, JetBrains plugin and desktop app so they don't recreate the folder.

Why does claude still run after I uninstalled it?

You have a second install or an old shell alias. Run which -a claude on Mac or Linux, or where.exe claude on Windows, to find it, then remove that copy with the matching command.

How do I remove Claude Code from Windows?

For a native install, run the two Remove-Item commands for claude.exe and the share\claude folder in PowerShell. For WinGet, run winget uninstall Anthropic.ClaudeCode. Then delete %USERPROFILE%\.claude and %USERPROFILE%\.claude.json if you want your settings gone.

Can I delete one project's Claude Code history without uninstalling?

Yes. Run claude purge with the project's path. It removes that project's transcripts, auto memory, task lists, debug logs, file history and its entry in ~/.claude.json. Add --dry-run to preview first.

Do I need to cancel my Claude plan too?

Uninstalling doesn't touch your subscription. Your Pro, Max or Ultra plan keeps billing until you cancel it in Settings > Billing on claude.ai.

Build it with us in Stride AI Academy

Four courses, weekly live calls and a community of people building and selling AI. Or start with 320+ free guides.

Keep reading

Free AI Coding guides