Complete Uninstall Guide for Claude Code on Windows: 6 Steps to Eliminate Residues
Claude Code, Anthropic’s AI coding assistant, often leaves hidden residues if uninstalled via standard Windows methods. This comprehensive guide...
Claude Code, developed by Anthropic, is a popular AI coding assistant that operates as a command-line tool, typically installed via npm or winget. Unlike traditional Windows applications, it doesn’t appear in the Control Panel or Settings app, making standard uninstallation ineffective. Partial removal can leave behind configuration files, cache data, and binary files—taking up disk space and causing conflicts when reinstalling or using other software.
Step-by-Step Uninstall Process
Follow these six steps to ensure Claude Code is completely removed from your Windows system:
1. Pre-Uninstall Preparation: Close all processes related to Claude Code, including terminal windows (CMD, PowerShell), IDEs (VS Code, JetBrains tools), and Node.js background processes like nodemon. This prevents "file in use" errors during uninstallation.
2. Uninstall the Main Program: Open PowerShell or Command Prompt as an administrator and run the npm uninstall command: npm uninstall -g @anthropic-ai/claude-code. This removes the core components of Claude Code.
3. Clean User Directory Residues: Navigate to your user directory (replace <username> with your actual username: C:\Users\<username>\.claude) and delete the entire .claude folder. This folder contains personal configuration files and cached data.
4. Clear Node.js Cache: To remove any leftover npm cache, run npm cache clean --force in PowerShell. You can also check Node.js installation and global package directories for additional residues.
5. Remove Environment Variables: Press Win + R, type sysdm.cpl to open System Properties. Go to the Advanced tab, click Environment Variables. Delete any Claude-related variables (e.g., CLAUDE_CODE_GIT_BASH_PATH) and remove Claude Code paths from the Path variable.
6. Verify Uninstallation: Open a new PowerShell window and run claude --version or claude -v. If you see a "not recognized" error, the main program is gone. Use where.exe claude or Get-Command claude to confirm no residual files remain.
Common Issues & Solutions
Issue 1: Claude version still shows after npm uninstall: Use where.exe claude to find residual executable files, delete them manually, then re-run the npm uninstall command and remove the .claude folder.
Issue 2: Claude Code not found in Control Panel: This is normal—command-line tools installed via npm don’t appear in standard Windows app lists. Use the npm uninstall command instead.
Issue3: File in use error: Ensure all related processes are closed. If problems persist, restart your computer and try manual deletion again.
Issue4: Configuration errors after reinstall: Old .claude folder residues are likely the cause. Delete the folder before reinstalling to avoid conflicts.
Alternatives to Claude Code
If you’re looking for alternatives, consider these AI coding assistants:
- Trae: A popular alternative with full IDE integration, free basic version, and high accuracy in code generation.
- OpenCode: Open-source tool supporting over 70 models (GPT, Claude, Gemini) and local deployment for privacy-focused users.
- DeepSeek-TUI: Terminal-based tool with compatible Skill files for easy migration from Claude Code, low cost, ideal for terminal users.
- OpenClaude: Open-source, terminal-optimized tool for minimalist, efficient workflows.
Sources