Skip to main content
NanoClaw ships an interactive uninstaller that removes a single install — its service, containers, image, data, and the credential agents it registered. Runtime artifacts are scoped by an install slug, defaulting to the first 8 hex characters of sha1(projectRoot). NANOCLAW_INSTALL_ID overrides that default; each install needs a distinct ID to keep its runtime artifacts separate. Review the preview before removal, particularly if you assigned an ID explicitly.

Run it

From the project root:
The uninstaller short-circuits before any setup work, so it never installs dependencies just to remove them. There’s also a wrapper that accepts the legacy short flags (-n--dry-run, -y--yes):
And if you run setup on a folder that already has an install, the wizard offers Uninstall NanoClaw & exit as an alternative to upgrading.
Start with bash nanoclaw.sh --uninstall --dry-run to see exactly what would be removed without changing anything.

What gets removed

The uninstaller groups everything it finds into four confirmation groups. Each group is shown as a what/where table and asks a separate, default-No question — you opt into each one. Your .env is never deleted outright — it’s copied to .env.bak first (a timestamped name if a backup already exists), so saved credentials survive the removal.

What’s left alone

The uninstaller is deliberately narrow. It does not touch:
  • The OneCLI app, your credentials, and the gateway — the vault is a shared, out-of-band component, so removing one NanoClaw copy never tears it down.
  • Other install identities on the machine — the install slug scopes runtime cleanup. Keep explicit NANOCLAW_INSTALL_ID values distinct.
  • Unattributed OneCLI agents by default — entries not linked to this copy are labeled “orphans”. --yes keeps them. The interactive flow offers a separate, default-No Delete them too? prompt; accept it only for agents you intend to remove.
A final summary prints what was left alone and any step that couldn’t complete, with a manual command to finish the job.

How it works

1

Scan

Inventories the artifacts tagged with this checkout’s install slug. If nothing is found, it reports the copy is already clean and exits.
2

Confirm (or preview)

Each non-empty group is shown with its contents and a default-No prompt. Nothing is deleted until every decision is made, so pressing Ctrl-C anywhere in this phase leaves the install completely untouched. With --dry-run, this phase just prints what would be removed and exits.
3

Execute

Applies your choices in a safe order — service and containers first (so nothing can respawn), then credential agents, data, and your content. The runtime tail (dist/, then node_modules/) goes last, because the uninstaller itself is running out of node_modules/.

Flags

--yes needs no terminal, which makes it the way to uninstall non-interactively; without it (and without --dry-run), the uninstaller requires an interactive terminal and stops otherwise.

If dependencies are missing

The uninstaller runs on the TypeScript toolchain in node_modules/. If those are already gone, bash nanoclaw.sh --uninstall can’t run the full flow — it prints manual cleanup commands instead, including how to remove this install’s containers and image by slug:

Upgrading

Update NanoClaw and its skills the supported way.

Credentials

The OneCLI vault the uninstaller deliberately leaves running.
Last modified on September 4, 2026