解除安裝
兩種路徑:- 簡易方式:如果
openclaw仍然已安裝。 - 手動移除服務:如果 CLI 已不存在,但服務仍在執行。
簡易方式(CLI 仍然已安裝)
.
- 停止 Gateway 閘道器服務:
- 解除安裝 Gateway 閘道器服務(launchd / systemd / schtasks):
- 刪除狀態與設定:
OPENCLAW_CONFIG_PATH 設定為狀態目錄之外的自訂位置,也請一併刪除該檔案。
- 刪除你的工作區(選用,會移除代理程式檔案):
- 移除 CLI 安裝(選擇你當初使用的方式):
- 如果你安裝了 macOS 應用程式:
- 如果你使用了設定檔(
--profile/OPENCLAW_PROFILE),請針對每個狀態目錄重複步驟 3(預設值為~/.openclaw-<profile>)。 - 在遠端模式下,狀態目錄位於 閘道器主機 上,因此步驟 1–4 也需要在該主機上執行。
手動移除服務(未安裝 CLI)
如果 Gateway 閘道器服務仍在執行,但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>))。
工作腳本位於你的狀態目錄下。
30.
任務腳本位於你的狀態目錄之下。
~\.openclaw-<profile>\gateway.cmd。
使用 npm rm -g openclaw 移除(若你是用該方式安裝,則使用 pnpm remove -g / bun remove -g)。
一般安裝(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)。
在刪除儲存庫之前 先 解除安裝閘道服務(使用上方的簡易路徑或手動移除服務)。
使用 npm rm -g openclaw 移除(若你是用該方式安裝,則使用 pnpm remove -g / bun remove -g)。
原始碼檢出(git clone)
如果你是從儲存庫檢出來執行(git clone + openclaw ... / bun run openclaw ...):
- Uninstall the gateway service before deleting the repo (use the easy path above or manual service removal).
- 如上所示移除狀態資料 + 工作區。
- 依照上述說明移除狀態 + 工作區。