# Update shld and roll back
Source: https://shld.app/guides/update-shld · Updated 2026-11-26 · Synced from shld cb495f9f

> Run the signed shld updater, inspect its result, and preserve the transaction when rollback or review becomes necessary.


At the end, shld will report a verified update or a preserved recovery state. Allow about five minutes for a normal update, with extra time for review after a failure.

## Before you start

- Use a recognized Linux amd64 or arm64 systemd installation.
- Confirm that the service uses the supported binary and state paths.
- Keep an administrator available for a failed transaction.
- Do not delete updater journals, locks, staging files, or backups.

## Steps

1. Check which release the host runs with `shld version`. The current release, `v0.1.0-pilot.20261125.1`, accepts in-place updates only from `v0.1.0-pilot.20261123.3` on amd64. Going back, each release accepts only the one before it: `v0.1.0-pilot.20261123.3`, `v0.1.0-pilot.20261123.2`, `v0.1.0-pilot.20261123.1`, `v0.1.0-pilot.20261120.1`, `v0.1.0-pilot.20261113.1` and `v0.1.0-pilot.20261112.1`. An amd64 host on `v0.1.0-pilot.20261112.1` updates six times, one release at a time. Move an arm64 host, or an amd64 host on an earlier release, once with the [upgrade procedure](/docs/updates#installer-upgrades-differ).

Outside that chain, `sudo shld update` to `v0.1.0-pilot.20261125.1` exits `4` and changes nothing. Do not repeat the updater. Each later release lists the versions it updates from in its signed `RELEASE.json`; run steps 2 to 5 for those.

2. Check the update without changing the host.

```sh
shld update --check
```

3. Review the candidate, installed identity, and compatibility result.
4. Request the signed update.

```sh
sudo shld update
```

The updater verifies the RSA-3072 signature over the exact `SHA256SUMS` bytes. It authenticates release metadata and archive hashes. It keeps rollback material until the new executable, service process, fresh scan, and tape continuity pass.

5. Check the result outcome and exit status.
6. Run the health check.

```sh
sudo shld doctor
```

`shld doctor` reads the service, tape, notification connection, advisory data, and scan capacity. It does not change anything.

Rollback restores the executable and prior service state without replacing newer tape records. Keep the original state path, configuration, enablement state, and newer tape appends.

## Automatic updates

A new installation also checks once a day for the release we roll out, and runs the same verified update as `sudo shld update`. Nothing installs until that release is published. Check the setting and the last attempt:

```sh
shld update auto status
```

On a host that reached its current release through `sudo shld update`, turn automatic updates on once; `shld status` and `shld doctor` show this command until you do:

```sh
sudo shld update auto enable
```

To keep updates manual, turn them off. The choice survives later updates:

```sh
sudo shld update auto disable
```

[Automatic updates](/docs/updates#automatic-updates) covers the daily timer, the release pointer it waits for, and how to turn it off.

## If something goes wrong

- Exit `2` means the invocation is invalid. Correct the command before you run it again.
- Exit `3` means authentication, download, or verification did not complete. Preserve the transaction and inspect the result.
- Exit `4` means installation, source identity, channel, or compatibility requires refusal. Request the documented upgrade path.
- Exit `5` means verified rollback restored the original executable and service state. Check the result before another attempt.
- Exit `6` means recovery remains unproved. Preserve `/usr/local/bin/.shld-update*` and stop update attempts.
- Review the recorded hashes against authenticated release artifacts.
- Restore a verified backup only after the candidate service stops.
- `sudo shld doctor` reports a warning or failure. Read its evidence and use its printed fix command only after review.

## Related

- [Install shld on Debian or Ubuntu with Claude Code](/guides/install-with-an-ai-assistant)
- [Check that a fix worked](/guides/verify-a-fix)
- [Stop or remove shld on a server](/guides/stop-and-remove)
- [Install and connect a server](/docs/install)
- [Update and roll back shld](/docs/updates)

