OpenClaw Uninstall Command: Remove Gateway Service and Local Data

Learn how to use the openclaw uninstall command to remove the Gateway service, state, workspace, or app. This page covers all flags and options for a clean uninstall.

Read this when

  • You want to remove the gateway service and/or local state
  • You want a dry-run first

openclaw uninstall

The Gateway service and/or local data can be removed with this command. Note that the CLI itself stays intact; use npm or pnpm to remove it separately.

Options

FlagDefaultDescription
--servicefalseDeletes the Gateway service.
--statefalseClears state and configuration.
--workspacefalseDeletes workspace folders.
--appfalseRemoves the macOS application.
--allfalseEquivalent to --service --state --workspace --app.
--yesfalseBypasses confirmation dialogs.
--non-interactivefalseTurns off prompts; needs --yes.
--dry-runfalseShows what would happen without deleting anything.

When no scope flags are given, an interactive multiselect asks which parts to remove, with service, state, and workspace already checked by default.

Examples

openclaw backup create
openclaw uninstall
openclaw uninstall --service --yes --non-interactive
openclaw uninstall --state --workspace --yes --non-interactive
openclaw uninstall --all --yes
openclaw uninstall --dry-run

Notes

Every requested scope is reported by uninstall, and a nonzero exit code appears if any cleanup fails or is prevented. If inspecting, stopping, or uninstalling the gateway service fails, changes to state and workspace are blocked, yet macOS app cleanup still proceeds on its own. Once service teardown is confirmed safe, the remaining permitted scopes run so that all failures surface together. On systems other than macOS, --app notes that the scope does not apply.

  • Execute openclaw backup create beforehand to create a restorable snapshot prior to deleting state or workspaces.
  • To remove state, --state demands exclusive ownership of it. When an unmanaged or externally controlled Gateway remains active, uninstall declines and instructs you to halt it first.
  • Configured workspace directories stay intact under --state unless --workspace is chosen as well.
323 words · updated Aug 22, 2026