static.apur.in

In-place Ubuntu LTS upgrade on a remote box

2026-11-01

An in-place distribution upgrade is the one routine task where the failure mode is "you are locked out and the machine is half-migrated". Everything below exists to avoid that single outcome.

Before touching anything

The upgrade itself

screen -S upgrade          # or tmux: a dropped link must not kill the upgrade
do-release-upgrade

Three prompts deserve more thought than the rest:

After the reboot

systemctl --failed
journalctl -b -p err --no-pager | head -40
apt -f install
apt-get -s full-upgrade | grep -Ei "REMOVED|held back"
needrestart -b            # services still running old binaries or libraries

The list of things that survive the upgrade in a broken-but-quiet state, in rough order of how often I have met them:

Rollback

There is no supported rollback from a partially upgraded release. The realistic options are the snapshot, or a restore onto a fresh install of the old release. This is the reason the first section is longer than the second.

Tested on 22.04 → 24.04. The shape is the same for any pair.

← manuals