🪟 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