You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(uninstall): keep shared shims when sibling ports remain
Scoped --destroy-user-data must not drop ~/.local/bin managed shims when
otherGatewayPorts proves a real sibling still shares them. Limit removal to
the unidentified scoped path and cover the confirmed-sibling retention case.
Signed-off-by: Rui Luo <ruluo@nvidia.com>
Copy file name to clipboardExpand all lines: docs/manage-sandboxes/uninstall-nemoclaw.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ It preserves resources from a separate OpenClaw installation while continuing to
25
25
|`--yes`| Skip the confirmation prompt. |
26
26
|`--keep-openshell`| Leave OpenShell binaries, NemoClaw-managed gateway service files, and local gateway state in place, and do not stop the host gateway process. |
27
27
|`--delete-models`| Delete every model reported by the host's local Ollama inventory and all non-credential data in the current user's shared `~/.cache/huggingface/` cache after managed model runtimes stop. Hugging Face authentication files remain. |
28
-
|`--destroy-user-data`| Also remove preserved user data in `rebuild-backups/`, `backups/`, and `sandboxes.json`, and remove installer-managed user-local CLI shims under `~/.local/bin/`. When sibling gateways remain, the shared npm CLI package stays. |
28
+
|`--destroy-user-data`| Also remove preserved user data in `rebuild-backups/`, `backups/`, and `sandboxes.json`. Removes installer-managed user-local CLI shims under `~/.local/bin/` only when sibling evidence is unidentified. When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package. |
29
29
|`--all-gateway-ports`| Uninstall every gateway port on the host instead of only the selected one. |
30
30
|`--gateway <name>`| Optional consistency check; must match the name derived from `NEMOCLAW_GATEWAY_PORT`. |
31
31
@@ -230,7 +230,7 @@ If validation, runtime cleanup, or temporary-claim retirement fails, uninstall e
230
230
Resolve the reported SSH, Docker, peer-host, or claim error before you retry.
231
231
Runtime cleanup can partially complete before an error, so inspect every cluster node before retrying.
232
232
When sibling gateways remain, it removes only the selected gateway's resources and port-scoped state and preserves those shared host resources.
233
-
With `--destroy-user-data`, that scoped path still removes installer-managed user-local CLI shims under `~/.local/bin/`while it keeps the shared npm CLI package and the other shared host resources for remaining gateways.
233
+
With `--destroy-user-data`, that scoped path removes installer-managed user-local CLI shims under `~/.local/bin/`only when sibling evidence is unidentified (for example odd `~/.nemoclaw/gateways/` entries or an unreadable gateway list). When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package and the other shared host resources.
234
234
A recorded sandbox that OpenShell reports as already removed leaves nothing to delete, so the scoped path reports it, finishes the remaining gateway cleanup, and exits `0`.
235
235
A sandbox that OpenShell cannot reach or refuses to delete still leaves state behind.
236
236
Uninstall exits nonzero and preserves the selected gateway registration, port-scoped state, and selected sandbox registry entry for a retry.
Copy file name to clipboardExpand all lines: docs/reference/commands.mdx
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4346,7 +4346,7 @@ Uninstall does not otherwise target the declared external directory.
4346
4346
|`--yes`| Skip the confirmation prompt |
4347
4347
|`--keep-openshell`| Leave OpenShell binaries, NemoClaw-managed gateway service files, and local gateway state in place, and do not stop the host gateway process |
4348
4348
|`--delete-models`| Outside portable cleanup, delete every model reported by the host's local Ollama inventory and all non-credential data in the current user's shared `~/.cache/huggingface/` cache after managed model runtimes stop. Hugging Face authentication files remain. Portable cleanup preserves both model stores and every Podman image. |
4349
-
|`--destroy-user-data`| Also remove preserved user data (`rebuild-backups/`, `backups/`, `sandboxes.json`) and installer-managed user-local CLI shims under `~/.local/bin/`. When sibling gateways remain, the shared npm CLI package stays. Portable cleanup still retains its recovery record until later completed onboarding durably supersedes it. |
4349
+
|`--destroy-user-data`| Also remove preserved user data (`rebuild-backups/`, `backups/`, `sandboxes.json`). Removes installer-managed user-local CLI shims under `~/.local/bin/` only when sibling evidence is unidentified. When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package. Portable cleanup still retains its recovery record until later completed onboarding durably supersedes it. |
4350
4350
|`--all-gateway-ports`| Uninstall every gateway port on the host, not only the port `NEMOCLAW_GATEWAY_PORT` selects |
4351
4351
|`--gateway <name>`| Optional consistency check; must match the name derived from `NEMOCLAW_GATEWAY_PORT`|
4352
4352
@@ -4452,7 +4452,7 @@ The default gateway uses `~/.nemoclaw/`; a non-default gateway uses `~/.nemoclaw
4452
4452
4453
4453
Outside portable cleanup, when uninstall confirms that no sibling gateways remain, it also removes shared host resources such as the gateway source clone, runtime state, and the Ollama auth proxy PID file.
4454
4454
When sibling gateways remain, it removes only the selected gateway's resources and port-scoped state while preserving those shared host resources.
4455
-
With `--destroy-user-data`, that scoped path still removes installer-managed user-local CLI shims under `~/.local/bin/`while it keeps the shared npm CLI package and the other shared host resources for remaining gateways.
4455
+
With `--destroy-user-data`, that scoped path removes installer-managed user-local CLI shims under `~/.local/bin/`only when sibling evidence is unidentified (for example odd `~/.nemoclaw/gateways/` entries or an unreadable gateway list). When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package and the other shared host resources.
4456
4456
If the OpenShell command is unavailable or its gateway list cannot be read, uninstall cannot confirm that the selected gateway is the last one, so it uses the same scoped path and preserves the shared resources.
4457
4457
When the command itself is unavailable, uninstall exits nonzero before OpenShell cleanup so you can restore the command and retry.
| Interactive TTY, user answers `y`| Removes the preserved entries in the selected gateway's state root; outside portable cleanup, a single-gateway uninstall also removes the remaining shared state. Portable cleanup preserves shared OpenShell resources and its retirement record. |
4470
4470
| Non-interactive (`--yes`, `NEMOCLAW_NON_INTERACTIVE=1`, or non-TTY shell) | Preserves the entries and prints a one-line notice. |
4471
-
|`--destroy-user-data`| Skips the secondary user-data prompt, removes the preserved entries in the selected gateway's state root, and removes installer-managed user-local CLI shims under `~/.local/bin/`. When sibling gateways remain, the shared npm CLI package stays. The global `Proceed?` confirmation still applies unless `--yes` is also passed. |
4472
-
|`NEMOCLAW_UNINSTALL_DESTROY_USER_DATA=1`| Skips the secondary user-data prompt, removes the preserved entries, and removes installer-managed user-local CLI shims under `~/.local/bin/`. When sibling gateways remain, the shared npm CLI package stays. The global `Proceed?` confirmation still applies unless `--yes` is also passed. |
4471
+
|`--destroy-user-data`| Skips the secondary user-data prompt and removes the preserved entries in the selected gateway's state root. Removes installer-managed user-local CLI shims under `~/.local/bin/` only when sibling evidence is unidentified. When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package. The global `Proceed?` confirmation still applies unless `--yes` is also passed. |
4472
+
|`NEMOCLAW_UNINSTALL_DESTROY_USER_DATA=1`| Skips the secondary user-data prompt and removes the preserved entries. Removes installer-managed user-local CLI shims under `~/.local/bin/` only when sibling evidence is unidentified. When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package. The global `Proceed?` confirmation still applies unless `--yes` is also passed. |
4473
4473
4474
4474
The preserved entries survive uninstall as inert files on disk.
4475
4475
Reinstall NemoClaw and re-onboard the sandbox before `$$nemoclaw <name> snapshot restore` can use them.
@@ -5145,7 +5145,7 @@ The following flags change defaults for commands that manage existing sandboxes.
5145
5145
|`NEMOCLAW_SHIELDS_SETTLE_MS`| milliseconds (default `750`, clamped to `0` to `10000`) | Settle window NemoClaw waits after re-applying a config lockdown (during shields auto-restore and `$$nemoclaw <name> shields up` drift remediation) before re-confirming the lock still holds. Detects when an in-sandbox reconciler changes config file permissions after lockdown and re-applies the lock; if NemoClaw cannot re-confirm the lock within the retry budget, shields stay down. This narrows the window in which a reconciler can revert permissions rather than eliminating it. The best-effort `chattr +i` immutable bit remains the only fully durable lock. Raise it on hosts where the gateway settles slowly. |
5146
5146
|`NEMOCLAW_SKIP_UNREACHABLE_SANDBOX_BACKUP`| Exactly `1` to opt in (`true`, `yes`, `0` are not accepted) | Applies to standalone `$$nemoclaw backup-all` runs. Skips running sandboxes whose in-sandbox SSH endpoint does not answer. It does not relax the installer's strict pre-upgrade backup, which still aborts if any registered sandbox is skipped or fails. Any uncommitted state since the last successful backup is not included in the skipped backup. |
5147
5147
|`NEMOCLAW_UNINSTALL_ALL_GATEWAY_PORTS`|`1` to opt in | Makes `$$nemoclaw uninstall` remove every gateway port on the host instead of only the port `NEMOCLAW_GATEWAY_PORT` selects. Equivalent to passing the `--all-gateway-ports` flag; the whole-host `Proceed?` confirmation still applies unless `--yes` is also passed. Each port runs as its own uninstall, and the variable is dropped from those runs so the sweep cannot re-enter itself. |
5148
-
|`NEMOCLAW_UNINSTALL_DESTROY_USER_DATA`|`1` to opt in | Acknowledges data loss during `$$nemoclaw uninstall`, removes the otherwise-preserved entries (`rebuild-backups/`, `backups/`, `sandboxes.json`) under `~/.nemoclaw/`, and removes installer-managed user-local CLI shims under `~/.local/bin/`. When sibling gateways remain, the shared npm CLI package stays. Equivalent to passing the `--destroy-user-data` flag; the global `Proceed?` confirmation still applies unless `--yes` is also passed. |
5148
+
|`NEMOCLAW_UNINSTALL_DESTROY_USER_DATA`|`1` to opt in | Acknowledges data loss during `$$nemoclaw uninstall` and removes the otherwise-preserved entries (`rebuild-backups/`, `backups/`, `sandboxes.json`) under `~/.nemoclaw/`. Removes installer-managed user-local CLI shims under `~/.local/bin/` only when sibling evidence is unidentified. When a confirmed sibling gateway port remains, those shared shims stay with the shared npm CLI package. Equivalent to passing the `--destroy-user-data` flag; the global `Proceed?` confirmation still applies unless `--yes` is also passed. |
0 commit comments