- 简单路径:如果
openclaw仍然安装着。 - 手动移除服务:如果 CLI 已经没了,但服务仍在运行。
简单路径(CLI 仍已安装)
推荐:使用内置卸载程序:--workspace。
预览将要移除的内容(安全):
--service、--state、--workspace、--app 选择单个作用域;--all 选择全部四项。
手动步骤(结果相同):
- 停止 gateway 服务:
- 卸载 gateway 服务(launchd/systemd/schtasks):
- 删除状态 + 配置:
OPENCLAW_CONFIG_PATH 设置为状态目录之外的自定义位置,也请删除该文件。
如果你想保留位于状态目录内的工作区,例如 ~/.openclaw/workspace,请在运行 rm -rf 之前将其移走,或选择性删除状态内容。
- 删除你的工作区(可选,会移除 agent 文件):
- 移除 CLI 安装(选择你使用的方式):
- 如果你安装了 macOS 应用:
- 如果你使用了 profiles(
--profile/OPENCLAW_PROFILE),请为每个状态目录重复步骤 3(默认值是~/.openclaw-<profile>)。 - 在远程模式下,状态目录位于gateway 主机上,所以也要在那里执行步骤 1-4。
手动移除服务(CLI 未安装)
当 gateway 服务还在运行,但openclaw 已经不存在时使用此方法。
macOS(launchd)
默认标签是ai.openclaw.gateway(如果使用了 profile,则为 ai.openclaw.<profile>):
ai.openclaw.<profile>。
Linux(systemd 用户单元)
默认单元名称是openclaw-gateway.service(或 openclaw-gateway-<profile>.service)。在从非常旧的安装升级的机器上,旧名称 clawdbot-gateway.service 的单元可能仍然存在;openclaw uninstall / openclaw gateway uninstall 会自动检测并移除它。
Windows(计划任务)
默认任务名称是OpenClaw Gateway(或 OpenClaw Gateway (<profile>))。
该任务会在你的状态目录下启动一个无窗口的 gateway.vbs 脚本,随后
运行 gateway.cmd;请将两者都删除。
~\.openclaw-<profile> 下的 gateway.cmd /
gateway.vbs 文件。
Normal Installation vs Source Checkout
Normal Installation (install.sh / npm / pnpm / bun)
If you usedhttps://openclaw.ai/install.sh or install.ps1, the CLI was installed via npm install -g openclaw@latest.
Remove it with npm rm -g openclaw (if you installed it with pnpm remove -g / bun remove -g, use the corresponding command).
Source Checkout (git clone)
If you’re running from a repository checkout (git clone + openclaw ... / bun run openclaw ...):
- Uninstall the gateway service before deleting the repository (using the simple path above or manually removing the service).
- Delete the repository directory.
- Delete state + workspace as shown above.