简单路径(CLI 仍可用)
openclaw uninstall非交互式(CI/自动化):
openclaw uninstall --all --yes --non-interactive
# 或通过 npx
npx -y openclaw uninstall --all --yes --non-interactive手动步骤(等效)
# 1. 停止 gateway
openclaw gateway stop
# 2. 卸载 gateway service(launchd/systemd/schtasks)
openclaw gateway uninstall
# 3. 删除状态和配置
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"
# 4. 删除 workspace(可选)
rm -rf ~/.openclaw/workspace
# 5. 卸载 CLI
npm rm -g openclaw
# 或 pnpm remove -g openclaw
# 或 bun remove -g openclaw
# 6. 删除 macOS app(如已安装)
rm -rf /Applications/OpenClaw.app使用了 --profile 的,需对每个 profile 的状态目录重复步骤 3(默认路径 ~/.openclaw-<profile>)。
手动移除 Service(CLI 已不可用)
macOS(launchd)
launchctl bootout gui/$UID/ai.openclaw.gateway
rm -f ~/Library/LaunchAgents/ai.openclaw.gateway.plistprofile 版本替换标签为 ai.openclaw.<profile>,同时清理旧版 com.openclaw.* plist。
Linux(systemd user unit)
systemctl --user disable --now openclaw-gateway.service
rm -f ~/.config/systemd/user/openclaw-gateway.service
systemctl --user daemon-reloadWindows(Scheduled Task)
schtasks /Delete /F /TN "OpenClaw Gateway"
Remove-Item -Force "$env:USERPROFILE\.openclaw\gateway.cmd"源码安装(git clone)
先卸载 gateway service,再删除仓库目录:
openclaw gateway stop
openclaw gateway uninstall
rm -rf /path/to/openclaw-repo
rm -rf "${OPENCLAW_STATE_DIR:-$HOME/.openclaw}"相关链接
- install-migrating — 迁移到新机器(卸载前备份)
- install-installer — 安装脚本参考