卸载(Uninstall)
两条路径:- 简易路径:
openclaw仍在。 - 手动移除服务:CLI 已没了,但服务还在运行。
简易路径(CLI 仍在)
推荐:使用内置卸载器:- 停止网关服务:
- 卸载网关服务(launchd/systemd/schtasks):
- 删除状态与配置:
OPENCLAW_CONFIG_PATH 设置到状态目录之外,还要删除该配置文件。
- 删除工作区(可选,会移除代理文件):
- 删除 CLI 安装(选择你使用的方式):
- 如果安装了 macOS 应用:
- 如果使用了 profile(
--profile/OPENCLAW_PROFILE),对每个状态目录重复步骤 3(默认~/.openclaw-<profile>)。 - 远程模式下,状态目录在 网关主机 上,步骤 1-4 需要在那台机器上执行。
手动移除服务(CLI 已卸载)
适用于网关服务仍在运行但openclaw 已缺失的情况。
macOS(launchd)
默认 label 为bot.molt.gateway(或 bot.molt.<profile>;旧的 com.openclaw.* 可能仍存在):
bot.molt.<profile>。如果存在旧的 com.openclaw.* plist,也请删除。
Linux(systemd 用户单元)
默认单元名为openclaw-gateway.service(或 openclaw-gateway-<profile>.service):
Windows(计划任务)
默认任务名为OpenClaw Gateway(或 OpenClaw Gateway (<profile>))。
任务脚本位于你的状态目录中。
~\.openclaw-<profile>\gateway.cmd。
普通安装 vs 源码 checkout
普通安装(install.sh / npm / pnpm / bun)
如果你使用https://openclaw.ai/install.sh 或 install.ps1,CLI 是通过 npm install -g openclaw@latest 安装的。
卸载时运行 npm rm -g openclaw(或 pnpm remove -g / bun remove -g)。
源码 checkout(git clone)
如果你从源码目录运行(git clone + openclaw ... / bun run openclaw ...):
- 删除仓库前先卸载网关服务(用上面的简易路径或手动移除服务)。
- 删除仓库目录。
- 按上文删除状态与工作区。