Claude Code 安装卸载指南 | Windows

📦 Claude Code · Windows 安装 & 卸载

三种安装方式 | 对应卸载命令

✨ 支持 WSL2 / npm / winget
⬇️ 安装 Claude Code
1️⃣ 通过 WSL2 环境 (npm)
npm install -g @anthropic-ai/claude-code
💡 前提:已安装 WSL2 + Node.js,在 WSL 终端中执行。
2️⃣ 原生 Windows + npm
npm install -g @anthropic-ai/claude-code
✅ 需要先安装 Node.js,在 CMD / PowerShell 中运行。
3️⃣ winget 包管理器
winget install Anthropic.ClaudeCode
🪟 Windows 10/11 自带,无需额外环境,终端执行即可。
🔍 安装后终端输入 claude 验证是否成功。
🗑️ 卸载 Claude Code
📌 npm 全局卸载 适用方式 1️⃣ / 2️⃣
npm uninstall -g @anthropic-ai/claude-code
适用 WSL2 环境或原生 npm 安装的用户。
⚙️ winget 专用卸载 适用方式 3️⃣
winget uninstall Anthropic.ClaudeCode
🧹 如果当初使用 winget install 安装,请用此命令卸载。
🔍 验证是否卸载成功
claude --version (提示无法识别即成功)
💡 手动清理配置:删除 %USERPROFILE%\.claude~/.claude (WSL)。
⚡ 提示:使用 winget 安装的 Claude Code 默认位于用户目录或 Program Files,卸载命令可干净移除。
若使用 npm 安装,卸载命令会移除全局命令行工具。

原文地址: https://www.cveoy.top/t/topic/qGGT 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录