
How to Uninstall Claude Code Completely
Remove Claude Code with the command for how you installed it, then delete ~/.claude and ~/.claude.json if you want your settings gone too.
- Local servers
- Yes
- runs stdio servers
- Hosted servers
- Yes
- connects by URL
- Config
- CLI + JSON
- how servers are added
- Plugins
- Yes
- plugin marketplaces
Claude Code can be installed with the native installer, Homebrew, WinGet, apt, dnf, apk or npm. Each has its own uninstall command, and removing one leaves the others in place. Run which -a claude (macOS/Linux) or where.exe claude (Windows) first to see every copy on your PATH.
Uninstalling the program keeps your settings, MCP servers and session history in ~/.claude/ and ~/.claude.json. Delete those only if you want a clean slate, and remove the VS Code extension, JetBrains plugin and Desktop app first, because they recreate ~/.claude/.
Good for
- Anyone removing Claude Code from macOS, Linux, WSL or Windows
- Users with two installs who see the wrong version of claude
- Developers resetting Claude Code to a clean state
Uninstall Claude Code completely
- 1
Find every installed copy
On macOS or Linux run
which -a claudeto list eachclaudeon your PATH. Then check the three places a copy can live:ls -la ~/.local/bin/claude(native installer)ls -la ~/.claude/local/(legacy local npm install)npm -g ls @anthropic-ai/claude-code(global npm)
On Windows run
where.exe claudeandTest-Path "$env:USERPROFILE\.local\bin\claude.exe". "No such file or directory" just means nothing is installed there. - 2
Remove the native install
macOS, Linux or WSL:
rm -f ~/.local/bin/clauderm -rf ~/.local/share/claude
Windows PowerShell:
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -ForceRemove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
- 3
Or remove a package-manager install
- npm:
npm uninstall -g @anthropic-ai/claude-code, andrm -rf ~/.claude/localfor the legacy local install - Homebrew:
brew uninstall --cask claude-code(orclaude-code@latestif you installed that cask) - WinGet:
winget uninstall Anthropic.ClaudeCode - apt:
sudo apt remove claude-code, then remove/etc/apt/sources.list.d/claude-code.listand/etc/apt/keyrings/claude-code.asc - dnf:
sudo dnf remove claude-code, thensudo rm /etc/yum.repos.d/claude-code.repo - apk:
apk del claude-code(repository and key cleanup in the Code section)
- npm:
- 4
Remove the IDE extension and Desktop app
In VS Code, open Extensions (
Cmd+Shift+Xon Mac,Ctrl+Shift+Xon Windows/Linux), search "Claude Code" and click Uninstall. Runningclaudein a VS Code terminal reinstalls it, so do this after removing the CLI, or turn off Auto-install IDE extension in/config.Also uninstall the JetBrains plugin and the Claude Desktop app if you use them; both write to
~/.claude/. - 5
Delete settings and history (optional)
This deletes your settings, allowed tools, MCP server configs and session history. macOS, Linux or WSL:
rm -rf ~/.clauderm ~/.claude.json
In each project,
rm -rf .claudeandrm -f .mcp.jsonremove project settings. Check first: teammates may rely on a committed.claude/folder or.mcp.json. Windows commands are in the Code section. - 6
Confirm it is gone
Open a new terminal and run
claude --version. "command not found" means it is removed. If it still prints a version, runwhich -a claudeagain: a second install or an old shell alias is left. Look for an alias line in~/.zshrcor~/.bashrc.
Code
# See every copy on your PATH
which -a claude
# Native installer
rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude
# npm (global) and the legacy local npm install
npm uninstall -g @anthropic-ai/claude-code
rm -rf ~/.claude/local
# Homebrew (use claude-code@latest if you installed that cask)
brew uninstall --cask claude-codewhere.exe claude
# Native installer
Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force
Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force
# WinGet
winget uninstall Anthropic.ClaudeCode
# npm
npm uninstall -g @anthropic-ai/claude-code# apt
sudo apt remove claude-code
sudo rm /etc/apt/sources.list.d/claude-code.list /etc/apt/keyrings/claude-code.asc
# dnf
sudo dnf remove claude-code
sudo rm /etc/yum.repos.d/claude-code.repo
# apk
apk del claude-code
sed -i '\|downloads.claude.ai/claude-code/apk|d' /etc/apk/repositories
rm /etc/apk/keys/claude-code.rsa.pub# Deletes settings, allowed tools, MCP server configs and session history
rm -rf ~/.claude
rm ~/.claude.json
# Project settings (run inside each project)
rm -rf .claude
rm -f .mcp.jsonRemove-Item -Path "$env:USERPROFILE\.claude" -Recurse -Force
Remove-Item -Path "$env:USERPROFILE\.claude.json" -Force
# Project settings (run inside each project)
Remove-Item -Path ".claude" -Recurse -Force
Remove-Item -Path ".mcp.json" -Force# macOS
rm -rf ~/Library/"Application Support"/Code/User/globalStorage/anthropic.claude-code
# Linux
rm -rf ~/.config/Code/User/globalStorage/anthropic.claude-code
# Windows (PowerShell)
Remove-Item -Recurse -Force "$env:APPDATA\Code\User\globalStorage\anthropic.claude-code"Common errors and fixes
claude still runs after uninstalling
Cause: A second installation (npm, Homebrew, native, or the legacy ~/.claude/local) or a leftover shell alias from an older installer.
Fix: Run `which -a claude`, remove each copy with its own command, check ~/.zshrc or ~/.bashrc for an alias, and open a new terminal.
claude-code Source
Cask 'claude-code@latest' is not installed
Cause: Homebrew has two casks, claude-code and claude-code@latest, and the one you named is not the one installed.
Fix: Run `brew list --cask | grep claude-code` to see which cask you have, then uninstall that one.
claude-code Source
~/.claude reappears after you deleted it
Cause: The VS Code extension, JetBrains plugin or Desktop app is still installed and writes to ~/.claude/.
Fix: Uninstall them first, then delete ~/.claude and ~/.claude.json.
claude-code, vs-code, jetbrains, claude-desktop Source
The Claude Code VS Code extension comes back after uninstalling
Cause: Running claude in a VS Code integrated terminal reinstalls the extension automatically.
Fix: Turn off Auto-install IDE extension in /config, set autoInstallIdeExtension to false, or set CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1.
vs-code Source
Running claude on Windows opens the Desktop app instead of the CLI
Cause: An older Claude Desktop registered a Claude.exe in WindowsApps that takes PATH priority.
Fix: Update Claude Desktop to the latest version.
claude-desktop Source
Verdict
Run the uninstall command for each copy that `which -a claude` finds, then delete ~/.claude and ~/.claude.json only if you want your settings and history gone.
The step people miss is the second copy. Older versions installed through npm into ~/.claude/local, and the VS Code extension reinstalls itself when claude runs in its terminal.
Best for
- A clean reinstall
- Fixing two installs that report different versions
Skip it if
- You only want to stop updates: disable auto-updates instead of uninstalling
Questions
How do I uninstall Claude Code?
Use the command for how you installed it. Native installer: rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. npm: npm uninstall -g @anthropic-ai/claude-code. Homebrew: brew uninstall --cask claude-code. WinGet: winget uninstall Anthropic.ClaudeCode. Then delete ~/.claude and ~/.claude.json if you also want your settings removed.
How do I uninstall Claude Code installed with npm?
Run npm uninstall -g @anthropic-ai/claude-code. Older versions of Claude Code also created a local npm install in ~/.claude/local/; remove it with rm -rf ~/.claude/local (macOS/Linux) or Remove-Item -Recurse -Force "$env:USERPROFILE\.claude\local" (Windows).
How do I uninstall Claude Code on a Mac?
If you used the install script, run rm -f ~/.local/bin/claude and rm -rf ~/.local/share/claude. If you used Homebrew, run brew uninstall --cask claude-code (or claude-code@latest). For a full reset also run rm -rf ~/.claude and rm ~/.claude.json, and remove the extension data at ~/Library/Application Support/Code/User/globalStorage/anthropic.claude-code if you used VS Code.
How do I uninstall Claude Code on Windows?
In PowerShell, remove the native install with Remove-Item -Path "$env:USERPROFILE\.local\bin\claude.exe" -Force and Remove-Item -Path "$env:USERPROFILE\.local\share\claude" -Recurse -Force, or run winget uninstall Anthropic.ClaudeCode if you used WinGet. Settings live in $env:USERPROFILE\.claude and $env:USERPROFILE\.claude.json.
Why does claude still run after I uninstalled it?
You have a second installation or a leftover shell alias from an older installer. Run which -a claude (or where.exe claude on Windows) to list every copy, remove each one with its own command, and check ~/.zshrc or ~/.bashrc for an alias. Open a new terminal before testing again.
Does uninstalling delete my settings and chat history?
No. The uninstall commands remove the program only. Settings, allowed tools, MCP server configurations and session history stay in ~/.claude/ and ~/.claude.json until you delete them. Project settings stay in each project's .claude/ folder and .mcp.json.
How do I remove the Claude Code VS Code extension?
Open the Extensions view (Cmd+Shift+X or Ctrl+Shift+X), search "Claude Code" and click Uninstall. To stop it coming back, turn off Auto-install IDE extension in /config, set autoInstallIdeExtension to false, or set the environment variable CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1. Its data lives in VS Code's globalStorage/anthropic.claude-code folder.
I deleted ~/.claude but it came back. Why?
The VS Code extension, the JetBrains plugin and the Desktop app also write to ~/.claude/. If any of them is still installed, the folder is recreated the next time it runs. Uninstall them first, then delete the folder.
Information
updated Nov 1, 2026
- Transports
- stdio, SSE, Streamable HTTP
- Config file (all)
.mcp.json (project) or ~/.claude.json (user)- MCP docs
- code.claude.com
Sources
Docs, issue trackers and discussions this page is built from.
Show all 3Hide
- Advanced setup: Uninstall Claude Code · code.claude.com
- Troubleshoot installation and login · code.claude.com
- Use Claude Code in VS Code · code.claude.com