乐于分享
好东西不私藏

OpenClaw卸载:免费官方教程(含安全要点)

OpenClaw卸载:免费官方教程(含安全要点)

OpenClaw卸载无需付费,官方提供一键命令,按步骤操作可彻底清除。以下是全平台通用教程,比付费服务更安全、高效。

🔧 全平台一键卸载(官方推荐)

通用前提

关闭所有OpenClaw相关进程与网关服务,避免残留。

Windows系统

1. 以管理员身份打开PowerShell/CMD;
2. 执行官方一键卸载:
powershell

openclaw uninstall --all --yes --non-interactive
 
3. 若 openclaw 命令失效,用npx临时调用:
powershell

npx -y openclaw uninstall --all --yes --non-interactive
 
4. 移除全局CLI工具(根据安装工具选择):
powershell

# npm
npm uninstall -g openclaw
# pnpm
pnpm remove -g openclaw
# bun
bun remove -g openclaw
 
5. 手动清理残留(关键):
- 删除历史版本目录:
powershell

rm -rf "$env:USERPROFILE\.openclaw"
rm -rf "$env:USERPROFILE\.clawdbot"
rm -rf "$env:USERPROFILE\.moltbot"
 
- 结束后台进程:
powershell

Stop-Process -Name openclaw -Force
 
- 删除Windows计划任务:在「任务计划程序」中删除OpenClaw Gateway任务。

macOS/Linux系统

1. 打开终端,执行一键卸载:
bash

openclaw uninstall --all --yes --non-interactive
 
2. 命令失效时用npx:
bash

npx -y openclaw uninstall --all --yes --non-interactive
 
3. 移除全局CLI工具:
bash

# npm
npm uninstall -g openclaw
# pnpm
pnpm remove -g openclaw
# bun
bun remove -g openclaw
 
4. 手动清理残留(必做):
bash

rm -rf ~/.openclaw
rm -rf ~/.clawdbot ~/.moltbot ~/.molthub
# 停止并卸载系统服务
# macOS
launchctl stop com.openclaw.gateway
launchctl remove com.openclaw.gateway
# Linux
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reload
 

⚠️ 安全必做(防残留风险)

1. 撤销第三方授权:前往GitHub、Google、OpenAI等平台,废弃曾给OpenClaw的API密钥/访问令牌,重新生成新密钥;
2. 验证卸载结果:
- Windows:执行 Get-Command openclaw 无输出;
- macOS/Linux:执行 which openclaw 无输出,且 npm list -g openclaw 显示为空;
3. 重启设备:确保所有后台进程彻底退出,避免残留影响系统性能。

❌ 避坑提醒

- 别先删CLI工具:必须先执行 openclaw uninstall ,再删全局包,否则会导致官方卸载逻辑失效;
- 拒绝付费服务:网上20-299元的“付费卸载”多为重复上述步骤,成本为0,且可能泄露隐私;
- 历史版本要清:旧目录( .clawdbot / .moltbot )易被忽略,手动删除可彻底根除风险。

按以上步骤操作,5分钟内可完成免费、安全、彻底的卸载,无需依赖任何付费服务。