跳到主要内容

卸载

两条路径:

  • 如果 clawdbot 仍处于安装状态,请使用 便捷路径
  • 如果 CLI 已删除但服务仍在运行,请使用 手动服务移除

便捷路径(CLI 仍处于安装状态)

推荐:使用内置卸载程序:

clawdbot uninstall

非交互式(自动化 / npx):

clawdbot uninstall --all --yes --non-interactive
npx -y clawdbot uninstall --all --yes --non-interactive

手动步骤(效果相同):

  1. 停止 Gateway 服务:
clawdbot gateway stop
  1. 卸载 Gateway 服务(launchd/systemd/schtasks):
clawdbot gateway uninstall
  1. 删除状态 + 配置:
rm -rf "${CLAWDBOT_STATE_DIR:-$HOME/.clawdbot}"

如果你将 CLAWDBOT_CONFIG_PATH 设置为状态目录之外的自定义位置,请也删除该文件。

  1. 删除你的工作区(可选,移除 Agent 文件):
rm -rf ~/clawd
  1. 移除 CLI 安装(选择你使用过的方式):
npm rm -g clawdbot
pnpm remove -g clawdbot
bun remove -g clawdbot
  1. 如果你安装了 macOS 应用:
rm -rf /Applications/Clawdbot.app

注意:

  • 如果你使用了配置文件(profile)(--profile / CLAWDBOT_PROFILE),请为每个状态目录重复步骤 3(默认值为 ~/.clawdbot-<profile>)。
  • 在远程模式下,状态目录位于 Gateway 主机上,因此也要在该主机上执行步骤 1-4。

手动服务移除(CLI 未安装)

如果 Gateway 服务持续运行但 clawdbot 命令已失效,请使用此方法。

macOS (launchd)

默认标签为 com.clawdbot.gateway(或 com.clawdbot.<profile>):

launchctl bootout gui/$UID/com.clawdbot.gateway
rm -f ~/Library/LaunchAgents/com.clawdbot.gateway.plist

如果你使用了配置文件(profile),请将标签和 plist 名称替换为 com.clawdbot.<profile>

Linux (systemd user unit)

默认单元名称为 clawdbot-gateway.service(或 clawdbot-gateway-<profile>.service):

systemctl --user disable --now clawdbot-gateway.service
rm -f ~/.config/systemd/user/clawdbot-gateway.service
systemctl --user daemon-reload

Windows (计划任务)

默认任务名称为 Clawdbot Gateway(或 Clawdbot Gateway (<profile>))。 任务脚本位于你的状态目录下。

schtasks /Delete /F /TN "Clawdbot Gateway"
Remove-Item -Force "$env:USERPROFILE\.clawdbot\gateway.cmd"

如果你使用了配置文件(profile),请删除匹配的任务名称和 ~\.clawdbot-<profile>\gateway.cmd

普通安装 vs 源码检出

普通安装 (install.sh / npm / pnpm / bun)

如果你使用了 https://clawd.bot/install.shinstall.ps1,CLI 是通过 npm install -g clawdbot@latest 安装的。 使用 npm rm -g clawdbot 移除它(如果你是用其他方式安装的,请相应使用 pnpm remove -gbun remove -g)。

源码检出 (git clone)

如果你是从仓库检出目录运行(git clone + clawdbot ... / bun run clawdbot ...):

  1. 在删除仓库 之前 卸载 Gateway 服务(使用上述便捷路径或手动服务移除)。
  2. 删除仓库目录。
  3. 按上述方法移除状态 + 工作区。