Back to blog

Uninstall Openclaw on Windows: Clean Gateway, Files, and CLI

April 10, 2026/By ClawPilot Editorial Team/9 min read/uninstall openclaw windows/Updated May 21, 2026

Remove Openclaw on Windows cleanly with the built-in uninstall flow, Scheduled Task cleanup, local state removal, and CLI package checks.

When you want a truly clean uninstall

Uninstalling Openclaw on Windows is not hard, but there is one detail that matters:

The built-in uninstaller removes the Gateway service, local state, and your local workspace, but if you want a fully clean machine, you should also remove the CLI install you used.

That is the part many people miss.

If you installed Openclaw locally on Windows, there are really two ways to remove it:

  • the auto way, using Openclaw's built-in uninstaller
  • the manual way, where you remove the scheduled task, state directory, workspace, config, and CLI yourself

This guide covers both.

Before you start

This post is for native Windows PowerShell installs.

If you installed Openclaw inside WSL2, uninstall it inside WSL, using the Linux uninstall path from the Openclaw docs rather than the Windows Scheduled Task path.

It also helps to know how you originally installed Openclaw:

  • via the official install.ps1 script
  • via npm install -g openclaw@latest
  • via pnpm or bun
  • from a git clone / source checkout

That affects the final cleanup step.

The auto way: easiest local uninstall

If the openclaw CLI still works on your machine, the official docs recommend the built-in uninstaller first:

openclaw uninstall

That is the easiest path for most people.

If you want the same thing in a fully non-interactive form, the official docs give:

openclaw uninstall --all --yes --non-interactive

And if the global CLI is broken but Node/npm still works, Openclaw also supports:

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

What the auto uninstaller actually removes

According to the official uninstall docs, the easy path is intended to remove:

  • the running Gateway service
  • the installed Gateway service wrapper
  • the Openclaw state directory
  • the local workspace directory

That means it handles most local cleanup for you.

What it does not automatically guarantee is removal of the package manager install you originally used for the CLI. So if your goal is a really clean uninstall, do the auto path first, then remove the CLI too.

The cleanest auto uninstall flow on Windows

If you want the shortest "clean uninstall" sequence on a Windows machine, use this order:

1) Run the built-in uninstaller

openclaw uninstall --all --yes --non-interactive

2) Remove the CLI package

If you installed with npm:

npm rm -g openclaw

If you installed with pnpm:

pnpm remove -g openclaw

If you installed with bun:

bun remove -g openclaw

At that point, most local Windows installs are fully removed.

The manual way: remove Openclaw step by step

The manual path is useful in three situations:

  • you want to verify every piece yourself
  • the openclaw command is no longer available
  • the Gateway keeps coming back because the Windows task was not removed cleanly

Below is the practical Windows version of the official uninstall logic.

Step 1: stop the Gateway if the CLI still exists

If the CLI is still installed, stop the Gateway cleanly first:

openclaw gateway stop

Then uninstall the Gateway service:

openclaw gateway uninstall

If those commands work, you are already most of the way there.

Step 2: remove the Windows Scheduled Task

If the CLI is gone, or you want to verify the service is really removed, use the Windows Scheduled Task cleanup path from the official docs.

The default task name is:

  • Openclaw Gateway

If you used a profile, the task is usually:

  • Openclaw Gateway (<profile>)

To delete the default task:

schtasks /Delete /F /TN "Openclaw Gateway"

If you used a profile, replace the task name with the matching profile task.

This is the most important manual cleanup step on Windows because it stops Openclaw from reappearing on login.

Step 3: remove the task script from your state directory

The official docs say the Windows task script lives under your state directory.

For the default local install, remove:

Remove-Item -Force "$env:USERPROFILE.openclawgateway.cmd"

If you used a profile, remove the matching script instead:

Remove-Item -Force "$env:USERPROFILE.openclaw-<profile>gateway.cmd"

Step 4: delete the local state directory

The official uninstall docs say the default state directory is under your user profile.

For the default local install:

Remove-Item -Recurse -Force "$env:USERPROFILE.openclaw"

If you used profiles, remove those directories too:

Remove-Item -Recurse -Force "$env:USERPROFILE.openclaw-<profile>"

If you set OPENCLAW_STATE_DIR yourself, remove that custom location instead of the default one.

Step 5: remove any custom config outside the state folder

The official docs make one important note here: if you used OPENCLAW_CONFIG_PATH and pointed it somewhere outside the default state directory, you should delete that file too.

For example:

Remove-Item -Force "C:\path\to\your\custom-openclaw.json"

You only need this step if you explicitly customized the config path.

Step 6: remove the workspace if you want all local agent files gone

If your goal is not just disabling Openclaw, but removing all local agent files and project context, remove the workspace too.

For the default local setup:

Remove-Item -Recurse -Force "$env:USERPROFILE.openclawworkspace"

In many installs this workspace sits under the main state directory, so removing the whole .openclaw folder already removes it. But it is worth calling out separately because the official docs list workspace removal as an explicit step.

Step 7: remove the CLI package

If you installed Openclaw using a package manager, remove the CLI itself too.

For npm:

npm rm -g openclaw

For pnpm:

pnpm remove -g openclaw

For bun:

bun remove -g openclaw

This is what makes the uninstall feel complete on a local machine.

Step 8: if you installed from source, delete the repo too

If you ran Openclaw from a git clone or source checkout, the official docs say you should:

  1. uninstall the Gateway service first
  2. remove state and workspace
  3. delete the repo directory

So after service cleanup, just remove the source folder you cloned locally.

A practical full manual cleanup sequence

If you want one straightforward Windows cleanup flow, this is the safest general version:

openclaw gateway stop
openclaw gateway uninstall
schtasks /Delete /F /TN "Openclaw Gateway"
Remove-Item -Force "$env:USERPROFILE.openclawgateway.cmd"
Remove-Item -Recurse -Force "$env:USERPROFILE.openclaw"
npm rm -g openclaw

If the CLI is already missing, skip the openclaw ... lines and just run the Scheduled Task and filesystem cleanup directly.

How to verify Openclaw is really gone

After uninstalling, these quick checks help:

Check that the task is gone

schtasks /Query /TN "Openclaw Gateway"

If Windows reports it cannot find the task, that is what you want.

Check that the state folder is gone

Test-Path "$env:USERPROFILE.openclaw"

This should return False for the default setup.

Check whether the CLI is still installed

openclaw --version

If PowerShell no longer recognizes the command, the CLI is gone too.

Common cleanup mistakes

The most common uninstall mistakes on Windows are:

  • removing the package but leaving the Scheduled Task behind
  • deleting .openclaw but forgetting a custom config path
  • forgetting profile-specific directories like .openclaw-work
  • deleting the repo checkout before uninstalling the Gateway service

If you avoid those, the uninstall is usually clean.

Final takeaway

If the CLI still works, the best local Windows uninstall path is:

openclaw uninstall --all --yes --non-interactive
npm rm -g openclaw

If the CLI is already gone or the Gateway keeps showing up, use the manual path: remove the Scheduled Task, delete gateway.cmd, delete the state directory, remove any custom config, and then remove the CLI or repo checkout if it still exists.

That gives you a truly clean local uninstall.

Helpful references