Skip to content
Guides

How to uninstall OpenClaw completely

The service, the state, the workspace, and the CLI

5 min read

Uninstalling OpenClaw is four scopes, not one command: the Gateway service, the state directory, the workspace, and the CLI itself, plus the desktop app if you installed it. The docs give an easy path while the CLI is still installed and a manual path for when it is gone but the service keeps running, which is the case that generates the forum threads. Here is both, and the one thing to move before you delete anything.

The easy path

  • One uninstall command, interactive by default, preselects only the Gateway service; select state, workspace and app too, or pass the all flag, for a complete removal.
  • A dry run with the all flag previews what would be removed, safely.
  • State removal preserves configured workspace directories unless you select the workspace scope as well.
  • Service teardown is the safety gate: if it fails, state and workspace deletion do not proceed, and the command returns a non-zero status when any scope fails.
Unlike openclaw uninstall --state, manual state deletion does not preserve workspaces.

The manual path

  • Stop the Gateway service, then uninstall it: launchd on macOS, systemd on Linux, Scheduled Tasks on Windows.
  • Move every workspace you want to keep out of the state directory first, including the default one, because deleting the state directory deletes the workspaces inside it.
  • Delete the state and config directory, and a custom config path if you set one; delete an external workspace only if you want its agent files gone too.
  • Remove the CLI with whichever tool installed it, and the macOS app from Applications.

Two leftovers the docs name

A pre-rename service unit from the Clawdbot era can still exist on machines upgraded from very old installs; the uninstall commands detect it. And environment variables with the old prefixes do nothing but trigger a warning, so they are worth removing from shell profiles while you are there. Clawdbot, Moltbot, OpenClaw has the rest of that story.

Before you uninstall: back up

The workspace holds the memory files, the skills you wrote and the agent’s instructions; the state directory holds the config, the credentials and the sessions. If there is any chance you will come back, the backup command exists, and how OpenClaw memory works explains what the memory files are and why they are the part worth keeping.

The other way to stop paying attention

People uninstall for two reasons: they are done, or they are done running it themselves. For the second, Hosted OpenClaw on Diali is the same runtime kept alive on an isolated instance, with the workspace backed up and the updates tested first, and nothing on your machine to remove later.

  • Service, state, workspace, CLI, app: five things, one command with the all flag.
  • Move the workspace out before a manual delete.
  • The service must stop before anything else is removed.
Get started

Stop reading about it, build one

Set up an agent, pick a channel, and have it working inside the app you already keep open.