卸载
有两种途径:- 如果
openclaw仍已安装,则采用简易路径。 - 如果 CLI 已消失但服务仍在运行,则采用手动移除服务的方法。
简易路径(CLI 仍已安装)
推荐使用内置卸载程序:- 停止网关服务:
- 卸载网关服务(launchd/systemd/schtasks):
- 删除状态和配置:
OPENCLAW_CONFIG_PATH 设置为状态目录之外的自定义位置,也请删除该文件。
- 删除工作区(可选,会移除代理文件):
- 移除 CLI 安装(选择你当时使用的安装方式):
- 如果你安装了 macOS 应用程序:
- 如果你使用了配置文件(
--profile/OPENCLAW_PROFILE),请对每个状态目录重复执行第 3 步(默认状态目录为~/.openclaw-<profile>)。 - 在远程模式下,状态目录位于网关主机上,因此也需在该主机上执行步骤 1–4。
手动移除服务(CLI 未安装)
如果网关服务仍在运行,但openclaw 已丢失,请使用此方法。
macOS(launchd)
默认标签为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。
普通安装与源码检出的区别
普通安装(install.sh / npm / pnpm / bun)
如果你使用了https://openclaw.bot/install.sh 或 install.ps1,则 CLI 是通过 npm install -g openclaw@latest 安装的。请使用 npm rm -g openclaw 将其移除(或者如果你是以其他方式安装的,则使用 pnpm remove -g / bun remove -g)。
源码检出(git clone)
如果你从仓库检出运行(git clone + openclaw ... / bun run openclaw ...):
- 在删除仓库之前,请先卸载网关服务(使用上述简易路径或手动移除服务)。
- 删除仓库目录。
- 按照上述说明移除状态和工作区。