This guide walks you through completely removing Claude Code from your system—including the CLI tool, cached data, configuration files, and any leftover processes—so nothing lingers in the background or breaks future installs. You’ll need terminal access on your operating system, and on Windows, PowerShell with administrator rights for some steps.
What You’ll Need
- Terminal (macOS/Linux) or PowerShell (Windows)
- Administrator/sudo privileges on your machine
- Your package manager (npm, Homebrew, etc.) if you installed via one
Step-by-Step
macOS
- Stop any running processes. Open Terminal and run
pkill -f "claude"to terminate any active Claude Code processes. - Uninstall the CLI package. If you installed via npm globally:
npm uninstall -g @anthropic-ai/claude-code. If you used Homebrew:brew uninstall claude-code. If you used a different method, check that tool’s uninstall command. - Remove configuration and data directories. Run the following commands to delete all Claude Code-related files in your home folder:
rm -rf ~/.claude rm -rf ~/.config/claude-code rm -rf ~/Library/Application\ Support/ClaudeCode rm -rf ~/Library/Caches/ClaudeCode
- Clean up shell aliases. If you added any aliases or PATH entries for Claude Code in your
.zshrcor.bash_profile, edit those files and remove those lines. - Verify removal. Run
which claude—it should return nothing. Also checknpm list -g --depth=0to confirm the package is gone.
Windows
- Close all related processes. Open Task Manager (Ctrl+Shift+Esc), look for any process named “claude” or “node” (if running Claude Code), and end them.
- Uninstall via npm. In PowerShell (as administrator), run
npm uninstall -g @anthropic-ai/claude-code. If you used a different installer, uninstall through that method. - Remove configuration folders. In PowerShell, execute:
Remove-Item -Recurse -Force $env:USERPROFILE\.claude Remove-Item -Recurse -Force $env:APPDATA\ClaudeCode Remove-Item -Recurse -Force $env:LOCALAPPDATA\ClaudeCode
- Clean up environment variables. Open System Properties → Environment Variables and remove any PATH entries that point to Claude Code’s installation directory (usually
%APPDATA%\npmif installed via npm). - Verify. Run
where claudein PowerShell—it should return no results.
Linux
- Terminate running processes. In a terminal, run
pkill -f "claude". - Uninstall the package. For npm global installs:
sudo npm uninstall -g @anthropic-ai/claude-code. For other package managers, use their corresponding uninstall command. - Delete configuration and cache files. Execute the following commands:
rm -rf ~/.claude rm -rf ~/.config/claude-code rm -rf ~/.cache/claude-code
- Check for leftover binaries. Use
which claudeto see if any binary remains in a system path. If found, remove it manually (e.g.,sudo rm /usr/local/bin/claude). - Verify removal. Run
claude --version—it should fail with “command not found”.
Common Mistakes
- Forgetting to remove config files. Even after uninstalling the binary, leftover config can cause issues on reinstall or consume disk space.
- Not checking for background processes. Claude Code may spawn background daemons that keep running after the main process exits.
- Using the wrong uninstall command. If you installed with a version manager like Volta or asdf, npm uninstall won’t work—use the manager’s own command.
- Skipping PATH cleanup. Leftover PATH entries can cause confusion later when you try to reinstall.
Tips
- Back up anything you need. If you have custom prompts or settings in
~/.claude, copy them elsewhere before deleting. - Use the official uninstaller if available. Some versions ship with an uninstall script—check the documentation first.
- Reinstall fresh. If you plan to reinstall later, a clean removal avoids version conflicts and corrupted caches.
- Check your shell startup files. Even if you didn’t add aliases manually, some installers modify them automatically.
Troubleshooting
- “claude” still runs after uninstall. This usually means a leftover binary exists in a different PATH location. Run
which -a claude(macOS/Linux) orwhere claude(Windows) to find all instances and delete them. - npm uninstall fails with permissions errors. On Unix systems, prefix the command with
sudo. On Windows, ensure PowerShell is running as administrator. - Configuration files won’t delete. On Windows, you may need to close all terminal windows first. On macOS/Linux, check file permissions with
ls -laand usesudo rmif necessary. - Errors about missing modules after uninstall. This can happen if a global npm package still references Claude Code. Run
npm prune -gto clean up orphaned dependencies. - Claude Code still appears in app launchers. On macOS, check
~/Applicationsand the system Applications folder for any leftover .app bundles and delete them manually.
Frequently Asked Questions
Will uninstalling Claude Code delete my chat history or conversations?
Yes, if you delete the ~/.claude directory (or equivalent), any locally stored conversation history and settings are removed. If you want to keep them, back up that folder first.
Do I need to uninstall Node.js to remove Claude Code?
No. Claude Code is a Node.js package; uninstalling it doesn’t require removing Node.js itself. Only remove the specific package.
Can I reinstall Claude Code after uninstalling?
Absolutely. A clean uninstall removes all traces, so you can reinstall fresh via npm or your preferred method without conflicts.
How do I know if Claude Code is still running in the background?
Use ps aux | grep claude on macOS/Linux or Get-Process | Where-Object {$_.Name -like '*claude*'} on Windows. If any processes appear, terminate them.
Is there an official uninstaller provided by Anthropic?
As of now, there is no standalone uninstaller; the steps above are the standard method for removing the CLI and its data.
Will uninstalling Claude Code affect other Anthropic tools?
No, uninstalling Claude Code only removes this specific CLI. Other tools like the API SDKs remain unaffected.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Fix Device Manager Not Opening in Windows 11
- How to Pause Snapchat Location
- System Restore Points Missing in Windows? Fixes
- Loop Nature Ambience Videos with FFmpeg on Ubuntu
- Install League of Legends on Linux: Full Guide
- Fix Error 0x80070001: Causes & Solutions