Each Ubuntu LTS release gets five years of standard security updates, and Canonical supports upgrading a server in place from one LTS to the next. In this tutorial you will upgrade an Ubuntu 24.04 LTS server to Ubuntu 26.04 LTS with the official do-release-upgrade tool: you will back up the server, bring 24.04 fully up to date, handle third-party repositories, run the upgrade safely over SSH, and verify the result. The same procedure works for upgrading 22.04 LTS to 24.04 LTS.

Prerequisites

Before you begin, you need:

  • A server running Ubuntu 24.04 LTS, for example a CubePath VPS.
  • A non-root user with sudo privileges, or root access.
  • At least 5 GB of free space on / and about 200 MB free on /boot if it is a separate partition.
  • Out-of-band access to the server (a web console or VNC from your provider's panel) in case SSH does not come back after the reboot.
  • A maintenance window. On a typical VPS the upgrade takes 20 to 60 minutes plus a reboot.

Step 1 - Checking the current release and upgrade availability

Confirm which release the server runs:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.3 LTS
Release:        24.04
Codename:       noble

Ubuntu only offers LTS-to-LTS upgrades once the first point release of the new LTS is published (26.04.1), after the most common upgrade bugs have been fixed. The upgrader reads its behaviour from /etc/update-manager/release-upgrades. On a server it should be set to lts:

grep ^Prompt /etc/update-manager/release-upgrades
Prompt=lts

If it says never, edit the file and change it to Prompt=lts. If it says normal, the upgrader would offer the next interim release (for example 25.10) instead of the next LTS.

Now ask the upgrader whether a new release is available without starting anything:

sudo do-release-upgrade -c
Checking for a new Ubuntu release
New release '26.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.

If you see There is no development version of an LTS available or No new release found, the LTS upgrade path has not been opened yet. Wait for the point release rather than forcing it.

Step 2 - Backing up the server

A release upgrade replaces most of the packages on the system. If something goes wrong halfway, restoring a backup is much faster than repairing a half-upgraded system.

The simplest option is a full snapshot of the server's disk from your provider's control panel, taken right before you start. Additionally, keep copies of your configuration and data off the server. For example, archive /etc and any application directories:

sudo tar -czf /root/pre-upgrade-etc-$(date +%F).tar.gz /etc

Dump databases with their own tools rather than copying their data directories while they run. For MySQL or MariaDB:

sudo mysqldump --all-databases --single-transaction > ~/all-databases-$(date +%F).sql

For PostgreSQL:

sudo -u postgres pg_dumpall > ~/postgres-$(date +%F).sql

Copy these files to another machine, for example with scp or rsync from your workstation, before continuing.

Step 3 - Bringing Ubuntu 24.04 fully up to date

The upgrader refuses to run if updates are pending for the current release, and it is safer to start from a fully patched system. Install all available updates, including those that change dependencies:

sudo apt update
sudo apt full-upgrade

Remove packages that are no longer needed:

sudo apt autoremove --purge

If a new kernel or core library was installed, reboot so the upgrade starts from a clean state:

[ -f /var/run/reboot-required ] && sudo reboot

After reconnecting, check that there are no half-configured or broken packages:

sudo dpkg --audit

The command prints nothing when all packages are in a consistent state. If it lists packages, run sudo dpkg --configure -a and then sudo apt -f install to fix them.

Step 4 - Reviewing held packages and third-party repositories

Held packages are pinned to their current version and can block the upgrade. List them:

apt-mark showhold

If the list is not empty, decide whether each hold is still needed and release it with sudo apt-mark unhold package_name. You can put the hold back after the upgrade if required.

Next, list the third-party repositories configured on the system:

ls /etc/apt/sources.list.d/
docker.sources  ubuntu.sources

ubuntu.sources contains the official Ubuntu archives. Everything else (Docker, PostgreSQL, Node.js, PPAs) is third party. During the upgrade do-release-upgrade disables these repositories automatically, because their packages for 24.04 may not be compatible with 26.04. Write down which ones you use so you can re-enable them in Step 7, and check on each vendor's site that they already publish packages for Ubuntu 26.04.

Finally, check free disk space:

df -h / /boot

If / has less than 5 GB free, clean old logs and caches first, for example with sudo journalctl --vacuum-size=200M and sudo apt clean.

Step 5 - Allowing the fallback SSH port

When do-release-upgrade detects that it runs over SSH, it starts an additional SSH daemon on port 1022 so you have a second way in if the main SSH service is restarted and fails. If you use UFW, open that port temporarily:

sudo ufw allow 1022/tcp
Rule added
Rule added (v6)

If your provider has a network-level firewall in front of the server, allow TCP 1022 there too, only from your own IP address if possible.

Step 6 - Running the upgrade

Start the upgrade:

sudo do-release-upgrade

The tool detects the SSH session and asks for confirmation:

Continue running under SSH?

This session appears to be running under ssh. It is not recommended
to perform a upgrade over ssh currently because in case of failure it
is harder to recover.

If you continue, an additional ssh daemon will be started at port
'1022'.
Do you want to continue?

Continue [yN]

Type y and press ENTER. The upgrader runs inside a screen session, so if your connection drops you can reconnect and reattach with:

sudo screen -r

The upgrade proceeds in stages, and you will be asked a few questions along the way:

  1. Third-party sources disabled: the upgrader tells you which repositories it disabled. Press ENTER.
  2. Summary and confirmation: it shows how many packages will be installed, upgraded and removed, and the download size. Review it and type y to start.
  3. Restarting services: when asked whether to restart services automatically during package upgrades, answer Yes on a server to avoid dozens of prompts.
  4. Modified configuration files: if you changed a file that a package also changed (for example /etc/ssh/sshd_config), you are asked what to do. The default, keeping your currently installed version, is the safe choice. Choose D first if you want to see the differences. You can review the maintainer's version later, because it is saved next to the original with a .dpkg-dist extension.
  5. Remove obsolete packages: type y unless you recognise a package in the list that you still need.
  6. Restart required: type y to reboot.

Step 7 - Verifying the upgraded system

After the reboot, log in over SSH on the usual port and confirm the new release:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 26.04.1 LTS
Release:        26.04
Codename:       resolute

Check the running kernel and look for services that failed to start:

uname -r
systemctl --failed
  UNIT LOAD ACTIVE SUB DESCRIPTION

0 loaded units listed.

If a unit appears in the list, inspect its logs with sudo journalctl -u unit_name -b and fix it before continuing. Then test your applications the way users reach them: load the website, connect to the database, run a job.

Re-enable third-party repositories. In deb822 .sources files the upgrader disables a repository with an Enabled: no line; in older .list files it comments out the deb lines. Open each file, for example:

sudo nano /etc/apt/sources.list.d/docker.sources

Remove the Enabled: no line (or uncomment the deb lines in a .list file) and make sure Suites: uses the new codename (resolute) instead of noble. Then refresh the package index and install any updates from those repositories:

sudo apt update
sudo apt full-upgrade

If apt update reports that a repository has no Release file for the new codename, that vendor does not support 26.04 yet. Disable the repository again until it does.

Step 8 - Cleaning up

Close the temporary SSH port if you opened it:

sudo ufw delete allow 1022/tcp

Remove packages that are no longer needed after the upgrade:

sudo apt autoremove --purge

Look for configuration files where you kept your version and the package shipped a new one, and compare them at your own pace:

sudo find /etc -name '*.dpkg-dist' -o -name '*.dpkg-old'

Delete the .dpkg-dist files once you have merged any changes you want from them. Keep the backups from Step 2 until the server has run normally for a few days.

Troubleshooting

"Please install all available updates for your release before upgrading." Run sudo apt update && sudo apt full-upgrade again, reboot, and retry. Held packages can also cause this: check apt-mark showhold.

"Not enough free disk space". The message says how much space is needed and on which filesystem. Free space with sudo apt clean, sudo journalctl --vacuum-size=200M and by removing old files, then run the upgrade again.

The upgrade was interrupted. Reconnect (on port 1022 if the main SSH port does not respond, or through the web console) and try sudo screen -r. If the upgrader is no longer running, finish configuring packages and complete the upgrade:

sudo dpkg --configure -a
sudo apt -f install
sudo apt full-upgrade

The server does not come back after the reboot. Use your provider's web console to see where boot stops. If the new kernel fails, select the previous kernel under "Advanced options for Ubuntu" in the GRUB menu, boot it, and investigate. If the system cannot be repaired, restore the snapshot from Step 2.

A service fails because of a changed configuration format. Compare your file with the .dpkg-dist version shipped by the package and read the service's logs with journalctl -u. Major version jumps (PHP, PostgreSQL, Python) are the most common cause; check the release notes for your application.

Conclusion

Your server now runs Ubuntu 26.04 LTS with standard security support until 2031, with your data, configuration and third-party repositories carried over. As next steps, confirm that automatic security updates are still active with systemctl status unattended-upgrades, remove the pre-upgrade snapshot once you are confident everything works, and read the Ubuntu 26.04 release notes for changes in the software you run.