🪟 Windows 专项清理
Windows 上的 OpenClaw 使用计划任务来管理 Gateway 服务,需要通过 PowerShell 清理。
删除计划任务
以管理员身份打开 PowerShell,运行:
# 删除 OpenClaw Gateway 计划任务
schtasks /Delete /F /TN "OpenClaw Gateway"
如果提示找不到任务,可能任务名不同。运行
schtasks /Query | findstr /i "openclaw clawdbot gateway" 查找实际名称。
删除启动脚本
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"
清理状态和配置
# 删除配置目录
Remove-Item -Recurse -Force "$env:USERPROFILE\.openclaw"
# 如果有自定义 Profile
Get-ChildItem "$env:USERPROFILE" -Filter ".openclaw-*" | Remove-Item -Recurse -Force
卸载 CLI
# npm 安装的
npm rm -g openclaw
# pnpm 安装的
pnpm remove -g openclaw
检查残留进程
# 查找 openclaw 相关进程
Get-Process | Where-Object { $_.ProcessName -match "openclaw|gateway" }
# 强制结束(如果有的话)
Get-Process | Where-Object { $_.ProcessName -match "openclaw" } | Stop-Process -Force