Guides ยท Oct 5, 2026
Upgrade Ubuntu 24.04 to 26.04 LTS on a VPS (Safe Step-by-Step)
How to upgrade a VPS from Ubuntu 24.04 LTS to 26.04 LTS with do-release-upgrade: backups, pre-checks, running it over SSH and rolling back.
Ubuntu 24.04 LTS and 26.04 LTS are both long-term support releases, and Ubuntu supports a direct upgrade from one LTS to the next. You do not need to reinstall your server. This guide walks through the upgrade on a VPS, with a focus on the things that go wrong on remote machines: losing your SSH session halfway, full disks, and third-party repositories.
If you are starting a brand-new server and have nothing to preserve, it is usually simpler to deploy a fresh Ubuntu 26.04 image on a Ubuntu VPS and move your data over. Upgrade in place when the server already runs software you do not want to rebuild.
Before you start: decide if you should upgrade now
- 24.04 is still supported. Ubuntu 24.04 LTS keeps receiving security updates for years, so there is no emergency. Upgrade when you have a maintenance window, not in a panic.
- Production services. If this server runs something customers depend on, rehearse the upgrade on a spare server first. A cheap second server for an afternoon is a good use of a cheap VPS.
- Read the release notes. Ubuntu publishes release notes for 26.04 listing changed defaults and removed packages. Skim them for anything you rely on (web server modules, PHP, Python, database versions).
Step 1: Back up first
An in-place upgrade replaces thousands of packages. It almost always works, but "almost" is not good enough without a backup. Do both of these:
- Make sure you have a recent server backup. TidalVPS takes daily backups, but check the date of the latest one in your dashboard before you begin.
- Copy the data that matters to somewhere else: databases,
/etc, and your application folders. Our restic backup guide shows an easy way to do this.
For databases, take a dump instead of copying live files:
sudo mysqldump --all-databases --single-transaction > /root/all-databases.sql
sudo -u postgres pg_dumpall > /root/pg-all.sql
Step 2: Fully update 24.04 first
The upgrade tool expects the current release to be completely up to date:
sudo apt update
sudo apt full-upgrade -y
sudo apt autoremove -y
sudo reboot
After the reboot, confirm your version and check free space. You want several gigabytes free on / and /var:
lsb_release -a
df -h /
grep Prompt /etc/update-manager/release-upgrades
The line Prompt=lts means the tool will offer the next LTS release. If it says Prompt=never, change it to lts with sudo nano /etc/update-manager/release-upgrades.
Step 3: Deal with third-party repositories and held packages
Check what you installed from outside Ubuntu's own archive:
ls /etc/apt/sources.list.d/
apt-mark showhold
The upgrader disables third-party sources automatically, and you re-enable them afterwards once the vendor publishes a repository for 26.04. For anything critical (Docker, a database vendor, Node.js), check that the vendor supports the new release before you begin. Remove holds with sudo apt-mark unhold PACKAGE if you no longer need them.
Step 4: Start the upgrade inside tmux
If your SSH connection drops while packages are half-installed, you can end up with a broken system. Run the upgrade inside tmux so it keeps going if you disconnect:
sudo apt install -y tmux
tmux new -s upgrade
sudo do-release-upgrade
If you get disconnected, log back in and run tmux attach -t upgrade.
When you connect over SSH, the tool warns you and opens an extra SSH daemon on port 1022 as a fallback. If you use a firewall, allow it for the duration of the upgrade:
sudo ufw allow 1022/tcp
Remember to delete that rule afterwards with sudo ufw delete allow 1022/tcp. See the UFW firewall guide if you are new to it.
If the tool says "No new release found", the LTS upgrade has not been enabled for your system yet. Ubuntu normally turns on LTS-to-LTS upgrades after the first point release of the new version. Check again later rather than forcing the development upgrade path on a server you care about.
Step 5: Answer the prompts
You will be asked a few things. These are the safe answers for most servers:
- Continue running under SSH? Yes.
- Start the upgrade? / Download size? Review and continue with
y. - Modified configuration files (for example
sshd_configornginx.conf): choose to keep your currently installed version if you customized the file, and look at the differences afterwards. Choosing the package maintainer's version replaces your changes (the old file is saved with a.dpkg-oldsuffix). - Restart services automatically? Yes is fine for most servers. Choose no if you want to control exactly when the web server restarts.
- Remove obsolete packages? Say no first if you are unsure, review the list, then remove them later with
sudo apt autoremove.
The upgrade can take a while depending on how many packages you have. When it finishes, it asks you to reboot. Say yes.
Step 6: Verify after the reboot
lsb_release -a
uname -r
systemctl --failed
sudo apt update && sudo apt full-upgrade -y
Then check your own services one by one: systemctl status nginx, docker ps, your database, your site in a browser, and your logs with journalctl -p err -b. Re-enable any third-party repositories you want back by checking the vendor's instructions for the new release, and remove the temporary firewall rule for port 1022.
Common problems and fixes
- Not enough free space. Run
sudo apt clean, remove old kernels withsudo apt autoremove --purge, and clear large logs withsudo journalctl --vacuum-size=200M. - Interrupted upgrade. Log in again and run
sudo dpkg --configure -afollowed bysudo apt -f install, then re-runsudo do-release-upgrade. - A service will not start. Read
journalctl -u SERVICE -b. The usual cause is a config option that changed or a language runtime that moved to a new major version. - Cannot log in over SSH after reboot. Use the web console in your TidalVPS dashboard and check
sudo sshd -tandsystemctl status ssh.
Rolling back
There is no supported downgrade from 26.04 to 24.04. The safe rollback is your backup: restore the server from the backup you checked in step 1, or reinstall 24.04 from the dashboard and restore your data. That is why the backup step is not optional.
After the upgrade
Take the opportunity to review your setup. Walk through the Ubuntu 26.04 VPS setup checklist and re-check your SSH hardening, since an upgrade can change defaults.
Frequently asked questions
Can I upgrade directly from 24.04 to 26.04?
Yes. Ubuntu supports a direct upgrade from one LTS release to the next with do-release-upgrade, so you do not need to go through any intermediate release.
Will my websites and databases survive the upgrade?
Usually yes, but some packages change major versions (PHP, Python, database servers). Take backups, read the release notes, and test on a spare server first if the machine is important.
Why does do-release-upgrade say no new release was found?
LTS-to-LTS upgrades are normally enabled after the first point release of the new version. Also check that Prompt=lts is set in /etc/update-manager/release-upgrades.
Is it safer to reinstall instead of upgrading?
A fresh install gives a clean system and is the safest option when you can rebuild easily. An in-place upgrade is more convenient when the server holds a lot of configuration.
Related guides
- Ubuntu 26.04 VPS Setup and Hardening Checklist
- How to Secure SSH on a New VPS: Keys, Config and Fail2ban
- Automated Encrypted VPS Backups with restic (Step by Step)
Need a server for this?
Every TidalVPS VPS comes with full root access, unmetered traffic, daily backups and DDoS protection.