Update fails at package-swap: previous package receipt not safely replaceable (2026.9.9, Raspberry Pi)

Hi guys, running into the issue:

OpenClaw 2026.9.9, npm global install on Raspberry Pi 4 (Raspberry Pi OS 64-bit). Updating to 2026.10.10 fails at package-swap: “The previous package receipt is not safely replaceable” (global-install-failed). openclaw update status shows “Package recovery: managed handoff lease database identity changed” (packageActivationError). The last successful update (2026.9.8 → 2026.9.9 on 8 Oct) left ~/.npm-global/lib/node_modules/.openclaw.package-activation-.control/operation.sqlite; its helper no longer exists. Earlier update attempts were interrupted on 7 Oct (system crash) and 4 Nov (SSH drop during validating); stage dirs from both remain. openclaw update repair completed with warnings; openclaw update cleanup --dry-run finds no recorded recovery artifacts. Per docs/install/updating.md I haven’t removed or recreated the receipt. What’s the supported way to recover or retire this operation so updates can proceed?

Some diagnostic information:


== status --all ==
OpenClaw status --all

Overview
┌────────────────────┬─────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Item               │ Value                                                                                           │
├────────────────────┼─────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Version            │ 2026.9.9                                                                                        │
│ OS                 │ linux 6.18.50+rpt-rpi-v8 (arm64)                                                                │
│ Node               │ 24.22.2                                                                                         │
│ Config             │ ~/.openclaw/openclaw.json                                                                       │
│ Dashboard          │ http://127.0.0.1:18789/                                                                         │
│ Tailscale exposure │ off                                                                                             │
│ Channel            │ stable (default)                                                                                │
│ Update             │ npm · npm update 2026.11.1                                                                      │
│ Gateway            │ local · ws://127.0.0.1:18789 (local loopback) · reachable 15s · auth token                      │
│ Update run         │ ⚠️ OpenClaw update failed: global-install-failed. The previous package receipt is not safely    │
│                    │ replaceable.                                                                                    │
│ Security           │ Run: openclaw security audit --deep                                                             │
│ Gateway self       │ unknown                                                                                         │
│ Gateway service    │ systemd user installed · enabled · running (pid 1244493, state active)                          │
│ Node service       │ systemd not installed                                                                           │
│ Agents             │ 1 total · 0 bootstrapping · 0 active · 11 sessions                                              │
│ Secrets            │ none                                                                                            │
└────────────────────┴─────────────────────────────────────────────────────────────────────────────────────────────────┘

Channels
┌──────────┬─────────┬────────┬────────────────────────────────────────────────────────────────────────────────────────┐
│ Channel  │ Enabled │ State  │ Detail                                                                                 │
├──────────┼─────────┼────────┼────────────────────────────────────────────────────────────────────────────────────────┤
│ Telegram │ ON      │ OK     │ token config ([REMOVED] · len 46) · accounts 1/1                                 │
└──────────┴─────────┴────────┴────────────────────────────────────────────────────────────────────────────────────────┘

Telegram accounts
┌──────────┬──────────┬────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Account  │ Status   │ Notes                                                                                          │
├──────────┼──────────┼────────────────────────────────────────────────────────────────────────────────────────────────┤
│ default  │ OK       │ token:*** · credential available in gateway runtime                                         │
└──────────┴──────────┴────────────────────────────────────────────────────────────────────────────────────────────────┘

Agents
┌─────────────┬────────────────┬──────────┬──────────┬─────────────────────────────────────────────────────────────────┐
│ Agent       │ Bootstrap file │ Sessions │ Active   │ Store                                                           │
├─────────────┼────────────────┼──────────┼──────────┼─────────────────────────────────────────────────────────────────┤
│ main (main) │ ABSENT         │       11 │ 16m ago  │ ~/.openclaw/agents/main/agent/openclaw-agent.sqlite             │
└─────────────┴────────────────┴──────────┴──────────┴─────────────────────────────────────────────────────────────────┘

Diagnosis (read-only)

Gateway connection details:
  Gateway target: ws://127.0.0.1:18789
  Source: local loopback
  Config: /home/ewan/.openclaw/openclaw.json
  Bind: loopback

✓ Config: /home/ewan/.openclaw/openclaw.json
✓ Secret diagnostics (0)
✓ Restart sentinel: none
✓ Port 18789
  Detected OpenClaw Gateway listener on the configured port.
✓ Tailscale exposure: off · daemon unknown
! Skills: 21 eligible · 35 missing · /home/ewan/.openclaw/workspace
✓ Plugin compatibility (none)
✓ Agent activity: 1 active in 30m · 11 sessions
✓ Inbound delivery telemetry: received 11 · dispatch 11/11 · turns 11 · processed 12
  latest delivery event: 17m ago

Gateway restart attempts (tail): /home/ewan/.openclaw/logs/gateway-restart.log
  [2026-10-07T18:53:36.400Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-10-08T10:15:43.549Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-10-08T12:13:15.708Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-10-08T12:24:19.031Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
                                                                                                                   [2026-10-10T17:17:49.265Z] openclaw gateway lifecycle source=cli action=restart mode=systemctl-restart interactive=1
  [2026-10-14T16:07:49.383Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-10-19T07:59:06.536Z] openclaw gateway lifecycle source=cli action=restart mode=systemctl-restart interactive=1
  [2026-11-04T15:21:19.753Z] openclaw gateway lifecycle source=cli action=restart mode=systemctl-restart interactive=1
  [2026-11-04T16:08:50.417Z] openclaw gateway lifecycle source=cli action=restart mode=systemctl-restart interactive=1
  [2026-11-04T16:42:30.001Z] openclaw gateway lifecycle source=cli action=restart mode=systemctl-restart interactive=1
  [2026-11-05T07:38:18.973Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-11-05T07:55:47.146Z] openclaw gateway lifecycle source=cli action=stop mode=systemctl-stop interactive=1
  [2026-11-05T09:47:09.957Z] openclaw gateway lifecycle source=cli action=start mode=systemctl-start interactive=1
✓ Channel issues (none)

Pasteable debug report. Auth tokens redacted.
Troubleshooting: https://docs.openclaw.ai/troubleshooting


== gateway status --deep ==
Service: systemd user (enabled)
Systemd transport: session-bus (unix:path=/run/user/1000/bus)
File logs: /tmp/openclaw/openclaw-2026-11-05.log
Command: /usr/bin/node --max-old-space-size=1383 /home/ewan/.npm-global/lib/node_modules/openclaw/dist/index.js gateway --port 18789
Service file: ~/.config/systemd/user/openclaw-gateway.service
Working dir: ~
Service env: OPENCLAW_GATEWAY_PORT=18789
Gateway heap: service argv: --max-old-space-size=1383; installer recommendation: 1383 MiB old space (1844 MiB physical capacity; adaptive cap 8192 MiB; native headroom cap 1383 MiB); runtime V8 ceiling: not measured
Host desktop: disabled

Config (cli): ~/.openclaw/openclaw.json
Config (service): ~/.openclaw/openclaw.json

Gateway: bind=loopback (127.0.0.1), port=18789 (service args)
Probe target: ws://127.0.0.1:18789
Dashboard: http://127.0.0.1:18789/
Probe note: Loopback-only gateway; only local clients can connect.

CLI version: 2026.9.9 (~/.npm-global/bin/openclaw)
Gateway version: 2026.9.9

Runtime: running (pid 1244493, state active, sub running, last exit 0, reason 0)
Last shutdown: stop (SIGTERM) at 2026-11-05T07:38:17.613Z
Connectivity probe: ok
Capability: connected-no-operator-scope

Listening: 127.0.0.1:18789
Troubles: run openclaw status
Troubleshooting: https://docs.openclaw.ai/troubleshooting

== update status ==
OpenClaw update status

┌──────────────────┬───────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Item             │ Value                                                                                             │
├──────────────────┼───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Install          │ npm                                                                                               │
│ Channel          │ stable (default)                                                                                  │
│ Package recovery │ managed handoff lease database identity changed                                                   │
│ Update           │ available · npm · npm update 2026.11.1                                                            │
└──────────────────┴───────────────────────────────────────────────────────────────────────────────────────────────────┘

Last recorded update (2026-11-05T07:59:16.579Z):
⚠️ OpenClaw update failed: global-install-failed.
Admission: candidate (2026.10.10).
Admission checks: config: warn, database-schema: ok, node-runtime: ok, plugin-availability: ok.
Snapshot location: ~/.openclaw.update-captures/openclaw-update-canary-6kMYXw (state-volume). Snapshot requires 900 MiB for 95 MiB SQLite and 413 MiB plugin files and scratch space. Checked /tmp: 838 MiB available; ~/.openclaw.update-captures: 102 GiB available.
Phases: requested (227.49s) → staging (720ms) → validating (4489.65s)
Failed: validating
Failed: package-swap — Exit code: 1; The previous package receipt is not safely replaceable.
Failing check package-swap (Error)
Failed: gateway recovery verification — Exit code: 1; Gateway did not settle.
Failing check settled (restart-unhealthy)
Warning: Doctor lint warning [core/doctor/runtime-tool-schemas]: update-validation-scope: Advisory inspection deferred until after update activation; required migration, config, plugin, and Gateway readiness checks remain enabled.: Run `openclaw doctor --lint --only core/doctor/runtime-tool-schemas` after activation to complete this inspection.
Warning: Doctor lint warning [core/doctor/skill-workshop-tool-policy]: update-validation-scope: Advisory inspection deferred until after update activation; required migration, config, plugin, and Gateway readiness checks remain enabled.: Run `openclaw doctor --lint --only core/doctor/skill-workshop-tool-policy` after activation to complete this inspection.
Warning: Doctor lint warning [core/doctor/bootstrap-size]: update-validation-scope: Advisory inspection deferred until after update activation; required migration, config, plugin, and Gateway readiness checks remain enabled.: Run `openclaw doctor --lint --only core/doctor/bootstrap-size` after activation to complete this inspection.
Recovery: not serving (restart-unhealthy).
Recorded verification: service stopped; channels not ready; HTTP not ready.
Current health: Gateway answered on the recorded port (2026.9.9). This observation supersedes saved claims that the Gateway is stopped; other recovery constraints still apply. The recorded update outcome is unchanged.
Historical recovery advice: “Run `openclaw triage` on this machine to open a coding agent that can diagnose and repair the installation.”

Update available (npm 2026.11.1). Run: openclaw update



Also: would a manual npm install -g openclaw@latest be safe here, or would that bypass the receipt protection and cause problems?

Hey there @Ewan_Vaz, and welcome to the community!

Thanks for the thorough diagnostics. The important clue is managed handoff lease database identity changed. The old recovery operation is tied to a lease database whose identity has changed, so 2026.9.9 can’t safely retire it. This is a known recovery scenario addressed in newer releases.

There’s a supported path forward without manually altering the receipt.

First, take a verified backup:

mkdir -p ~/Backups/openclaw
openclaw backup create --output ~/Backups/openclaw --verify

Then, from an independent SSH session using the same account and npm global prefix, run these commands individually, checking each result before proceeding:

openclaw gateway stop
npm install -g openclaw@latest
openclaw --version
openclaw doctor --fix
openclaw update repair
openclaw update status

For npm 11.16+ or npm 12, add --allow-scripts=openclaw to the install command.

Only after Doctor and repair complete successfully, refresh and verify the Gateway:

openclaw gateway install --force
openclaw gateway start
openclaw gateway status --deep

The newer repair path can retire an eligible obsolete publication operation while preserving its journal and recovery artifacts. It won’t silently discard unfinished rollback work or override an active update owner.

A couple of important points:

  • Don’t manually delete or recreate operation.sqlite, the activation control directory, or the remaining staging directories.

  • update cleanup --dry-run finding nothing doesn’t mean the package-activation receipt has been cleared. Those are separate recovery mechanisms.

  • Your latest diagnostics show that the original 2026.9.9 Gateway is responding again, despite the earlier failed restart verification. That’s good, but the update itself remains failed.

A direct npm install is supported in this situation, but only with the backup, controlled Gateway shutdown, Doctor, and repair steps above. Running npm install -g against the live Gateway isn’t the safe alternative.

Documentation: Other update methods - OpenClaw

If the new repair still refuses, preserve the reported recovery paths and stop there rather than modifying the receipt manually. The refusal should identify what’s preventing safe settlement.

Hope this helps!

-Joe

Hi Joe!

Thanks for your quick reply, that worked a treat!!

Cheers,
Ewan