Knowledgebase

Find frequently asked questions and setup guides by searching or by browsing the categories.

Before You Start

  • Snapshot or backup: a release upgrade changes most packages on the system. Take a snapshot so you can roll back within minutes, and have a recent backup of your data as well. The difference is explained in snapshot vs backup, and a backup plan in how to back up a Linux server.
  • Disk space: the upgrade downloads and unpacks a large number of packages. Check the available space on / and /boot with df -h.
  • A way back in: make sure you can open the server's console in your provider's control panel.
  • Time: plan a maintenance window; services restart during the upgrade.

Step 1: Update the Current Release

sudo apt update
sudo apt full-upgrade
sudo reboot

The upgrader expects a fully updated system. Reboot if a new kernel was installed. More on these commands is in sudo apt update.

Step 2: Start a tmux Session

tmux new -s upgrade

If your SSH connection drops, the upgrade keeps running inside tmux, and you reattach with tmux attach -t upgrade. The keys are in the tmux cheat sheet. The provider's console is the other safe place to run it.

Step 3: Run do-release-upgrade

sudo do-release-upgrade

The tool comes with the ubuntu-release-upgrader-core package, which Ubuntu Server normally includes. It checks for a new release, shows what will change, and asks before it starts. In a text session it also runs itself inside GNU screen when screen is installed, so starting sudo do-release-upgrade again after a dropped connection reattaches to the running upgrade.

When it runs over SSH, it warns you and offers to start an extra SSH server on port 1022 as a fallback. If a firewall blocks that port, the fallback is of no use until you open it, for example with sudo ufw allow 1022/tcp; close it again afterward.

Which Release You Are Offered

The setting Prompt in /etc/update-manager/release-upgrades decides this. With Prompt=lts, the default on LTS releases, a server is offered only the next LTS release. With Prompt=normal, it is offered the next release of any kind.

The upgrade from one LTS release to the next is offered only after the new release's first point release, such as 26.04.1, which usually comes a few months after the release itself. Before that, do-release-upgrade -d starts it early; leave that to test machines, not production servers. Releases cannot be skipped, apart from going from one LTS to the next.

During the Upgrade

  • Third-party repositories: the upgrader disables them, such as a vendor's apt repository or a PPA, because their packages may not exist for the new release yet.
  • Changed configuration files: when you edited a file that the new package also changes, you are asked which version to keep. Keeping your version is the safe default; the diff option shows the difference first.
  • Obsolete packages: at the end, the tool offers to remove packages that are no longer supported. Read the list before you agree.

Step 4: Reboot and Check

sudo reboot
cat /etc/os-release
systemctl --failed

Confirm the new version, as in how to check your Ubuntu version, and list services that did not start. Then test your sites and applications. Re-enable each third-party repository in /etc/apt/sources.list.d/ once its vendor publishes packages for the new release, and run sudo apt update again.

What Changes in Ubuntu 26.04

Ubuntu 26.04 replaces several core tools: most coreutils commands come from a Rust rewrite, sudo is sudo-rs, and new installs use chrony for time. Everyday options behave the same, but scripts that rely on rarely used options or exact message text should be tested after the upgrade. sudo rules are covered in the sudoers file.

When a Fresh Install Is Safer

An in-place upgrade suits a server that follows the standard packages. When the system carries many third-party repositories, hand-built software, or several releases of history, building a new server on the new release and moving the data over is often less risky: the old server keeps running until the new one is tested.

Was this answer helpful?
Loading...