SSD Nodes Learn Hosting plans →
Guides Matt ConnorBy Matt Connor

Upgrade Ubuntu in place or reinstall?

Six checks that tell you whether do-release-upgrade to Ubuntu 26.04 is safe on your VPS, or whether a fresh server and a migration is the better call.

Upgrade in place or reinstall: the short answer

Upgrade Ubuntu in place with do-release-upgrade when the server does one job, every package on it comes from Ubuntu's own archive, you took a snapshot minutes before starting, and a maintenance window of several hours is acceptable. Build a fresh Ubuntu 26.04 VPS (virtual private server) and migrate when the server carries PPAs (personal package archives) or vendor repositories, hand-edited config files, a history that began on 22.04, or data you would rather restore cleanly than carry across. The inventory below tells you which of those two servers you have.

The decision matters because the in-place upgrader is a package transaction, not a reinstall. It upgrades packages for 26.04, installs new dependencies, and can remove packages and change system configuration. What it leaves behind is exactly what breaks.

What do-release-upgrade does to your server

do-release-upgrade is the release upgrader from the ubuntu-release-upgrader-core package. It rewrites your apt sources to point at the new release, disables third-party repositories by default, calculates the package changes, runs the upgrade, then offers optional obsolete-package cleanup. It also moves snaps tied to the old release onto the new one, which the snaps check below covers. The disabling step is the one that matters for this decision. As documented on 21 October 2026, the 26.04 upgrader converted one-line .list apt sources to deb822 .sources files and disabled third-party sources without a message of its own, then listed installed packages from outside the archive and asked before going on:

Foreign Packages Installed

The following unofficial packages are currently installed:

<package>................Installed from: <origin>

It is recommended to install supported versions from the Ubuntu archive, and try the upgrade again.

Do you want to continue the upgrade anyways?

Answering no aborts the upgrade before it has changed any package. If you continue, disabling a PPA or vendor repository does not by itself remove or freeze its packages. APT selects versions using available versions, priorities and dependencies, so an eligible newer version from Ubuntu's archive can replace a third-party version. A retained package with no eligible update from an enabled source gets no updates from APT. If that package depends on a library that 26.04 replaced, it either blocks the upgrade calculation or is removed as part of it. That is why third-party sources are the first item in the inventory.

When to upgrade Ubuntu in place

Upgrade in place when all four of these are true.

  • The server does one job: a web server, a database, a VPN endpoint, a game server. One job means one service to test afterwards.
  • Every installed package comes from Ubuntu's archive. The check for this is below, and the answer is either zero third-party packages or it is not.
  • You have a snapshot taken minutes before the upgrade, and you know how to roll back to it. A snapshot is the undo button for an in-place upgrade, though it is not a backup, because it lives on the same host as the server.
  • A maintenance window of several hours is acceptable. The upgrader stops and restarts affected services while replacing packages, then asks you to reboot at the end. Service interruptions and the final reboot cause downtime.

If all four hold, follow the in-place upgrade from Ubuntu 24.04 to 26.04. If it stops half way, the recovery guide for a failed release upgrade covers the half-configured dpkg state and the roll-back to the snapshot.

When to reinstall and migrate

Build a fresh 26.04 VPS when any one of these is true.

  • Packages come from PPAs or vendor repositories. Docker, Tailscale, PostgreSQL from apt.postgresql.org, a mainline kernel. Third-party repositories are disabled by default, and Ubuntu's archive does not guarantee a replacement for every package.
  • Config files under /etc have been edited by hand over years. Changed package conffiles that also change in the new package produce upgrade prompts, and other configuration files have their own package-specific handling.
  • The server was installed as 22.04 or earlier. Ubuntu does not skip LTS (long-term support) releases, so the in-place path from 22.04 is two upgrades, 22.04 to 24.04 and then 24.04 to 26.04. Two transactions, two sets of prompts, two reboots, two chances to fail.
  • The data is worth more than the install. A database, a mail spool, a Nextcloud data directory, a game world. Restoring it onto a clean install is a procedure you can rehearse. Carrying it through an upgrade is not.

The reinstall path is migrating the server to a new VPS: build 26.04, install the same services from their 26.04 sources, copy the data, cut over DNS (the domain name system). The old server keeps serving until the new one is proven, so the downtime is the DNS cut, not the whole procedure.

The pre-flight inventory

Run these on the existing server. Every command here is read-only and changes nothing. Together they answer the question.

1. Third-party apt sources

ls /etc/apt/sources.list.d/
grep -rhE '^(deb |URIs:)' /etc/apt/sources.list /etc/apt/sources.list.d/ 2>/dev/null

On a stock 24.04 install the directory holds ubuntu.sources and nothing else. Every other file is a source somebody added. The grep prints the URL behind each one. Ubuntu's own archive answers as archive.ubuntu.com or security.ubuntu.com, and many providers point their images at a local mirror of it, which is fine. Check unfamiliar hosts before classifying them: Ubuntu also uses hosts such as ports.ubuntu.com, and official mirrors have other names.

The sources tell you what was added. A second command tells you which installed packages actually came from outside the archive:

pro security-status --thirdparty

pro is the Ubuntu Pro Client, which Canonical pre-installs on every Ubuntu system. With --thirdparty it lists only installed packages that the official Ubuntu archive does not provide, such as packages from Launchpad PPAs. As documented on 21 October 2026, the older ubuntu-security-status command from update-manager-core on 24.04 printed This command has been replaced with 'pro security-status'. when pro was present and ran the full report, ignoring --thirdparty. A summary that counts zero packages from third parties means the archive-only condition holds. The list does not predict which versions the upgrader will retain: an eligible newer Ubuntu version can replace a listed package. Read the list and ask what each package does. A monitoring agent is a small thing to reinstall after the upgrade. A database engine or a container runtime is not.

Run pro security-status --unavailable as well. It lists packages with no installation source, including packages left over from an earlier release, installed from a downloaded .deb, or retained after a source was disabled. Those are the same problem, with the source already gone. Both reports depend on current APT indexes; refresh them with sudo apt update if they are stale.

2. Held and pinned packages

apt-mark showhold
ls /etc/apt/preferences.d/

apt-mark showhold prints one package name per line. Healthy output is nothing at all. A held package is one you told apt never to change, and the release upgrader has to change nearly everything. A hold that prevents dependency resolution produces this:

Could not calculate the upgrade

An unresolvable problem occurred while calculating the upgrade.

If unofficial packages are installed, the upgrader names them as the likely cause, and either way it stops before it has changed any installed packages. Remove the hold with sudo apt-mark unhold <package> if you can live with the newer version, or count it as a reason to reinstall.

/etc/apt/preferences.d/ holds pin files. An empty directory is the default. Any file in it deserves a read: a pin that names a release codename such as noble, or sets a priority above 1000, can hold the whole system at the old release and produce the same calculation failure.

3. Snaps

snap list

The release upgrader does act on snaps. As documented on 21 October 2026, before the upgrade it checked that the server could reach the Snap Store and added the size of any snaps it would install to its disk calculation. After the package upgrade it switched snaps from channels tied to the old release, of the form stable/ubuntu-24.04, to their 26.04 equivalents, installed snaps that replaced debs in the new release, and finished with a snap refresh whose errors it ignored. If the store was unreachable, it asked whether to continue, and if the lxd deb was installed it aborted outright, because lxd was provided as a snap. So on the in-place path, a server that cannot reach the Snap Store through its firewall or proxy is something to fix first. sudo snap debug connectivity checks that connectivity.

The list matters for the other path too: every snap on it is something you install by hand on the new server. A fresh 26.04 image shows only the snaps Canonical seeds, and if you would rather they did not update themselves at random moments, controlling snap refreshes on a server is worth setting up on the new box from the start.

4. The kernel

uname -r
dpkg -l 'linux-image-*' | grep '^ii'
apt-cache policy "linux-image-$(uname -r)"

The first line is the running kernel. The second is every kernel package installed. The third shows the versions and priorities in APT's current indexes. An Ubuntu archive entry under the installed version shows that version is available from the listed archive or mirror; its priority depends on your APT configuration. A kernel that shows only 100 /var/lib/dpkg/status has no matching version in the current APT indexes. That does not establish where it was installed from: an Ubuntu-installed kernel can show this after repository or index changes. Check the kernel selected for the first reboot, especially if a custom kernel has a higher version number; pinning which kernel boots covers that choice.

Then check that a kernel metapackage is installed:

dpkg -l 'linux-generic*' 'linux-virtual*' 'linux-image-generic*' 'linux-image-virtual*' 2>/dev/null | grep '^ii'

You want at least one line. On most VPS images it is linux-virtual or linux-generic; the HWE (hardware enablement) form is linux-generic-hwe-24.04. The metapackage is what pulls each new kernel in for you, during the upgrade and for every security kernel after it. No line means none of the metapackages matched by this command is installed; it does not establish why, and other kernel flavours use different metapackages. The GA (general availability) kernel and the HWE kernel are the two tracks, and GA versus HWE kernels on Ubuntu Server explains which belongs on a VPS.

5. Disk headroom

df -h / /boot /var
sudo du -sh /var/cache/apt/archives

The upgrader downloads replacement packages before installing them and checks for enough free space. As documented on 21 October 2026, its insufficient-space message was:

Not enough free disk space

The upgrade has aborted. The upgrade needs a total of <size> free space on disk '/'. Please free at least an additional <size> of disk space on '/'.

It tells you how much it wants, and the number is computed from your package set, so no figure quoted here would be true for your box. What you can do before asking: sudo apt clean empties the download cache, and sudo apt autoremove --purge removes automatically installed packages that are no longer needed, including their configuration files. If /boot is a separate small partition, old kernels are what fill it, and removing old kernels is the fix. Do it before the upgrade, not when the upgrade discovers it.

6. Hand-edited config files

sudo dpkg -V 2>/dev/null | grep ' c /etc/'

dpkg -V compares file contents against recorded checksums where those checksums exist. A conffile, which is dpkg's name for a configuration file a package owns, prints with a c marker when it differs, like ??5?????? c /etc/ssh/ssh_config, where the 5 says the checksum changed. Every such line identifies a checksum difference, usually an edit by you or a script. That is normal. A server with no edited config is not doing anything. The list is only part of the inventory: /etc/ssh/sshd_config is managed through ucf, so editing it does not produce this dpkg conffile entry. Review it and other configuration files managed outside dpkg separately. When the 26.04 package also ships a new version of a dpkg conffile you changed, the upgrade stops and asks:

Configuration file '/etc/ssh/ssh_config'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.

Keeping yours can leave a directive the new version no longer accepts. Taking theirs throws your edit away. Each prompt is a decision during the upgrade; it does not establish that the service is down. A short list of files you know well is fine for an in-place upgrade. A long list, or files you no longer remember editing, is the strongest reason to reinstall. On a fresh 26.04 box you write each config once, from the new default, while the old server keeps serving.

The timing: the LTS path opens at 26.04.1

With Prompt=lts in /etc/update-manager/release-upgrades, do-release-upgrade checks for LTS upgrades, which are normally offered after the next LTS's first point release. Canonical's 26.04.1 announcement said automatic upgrade offers from 24.04 would follow a couple of weeks later, after planned fixes for rust-coreutils regressions. That point release shipped on 27 August 2026, and as of 21 October 2026 Canonical's meta-release-lts file, the file do-release-upgrade reads under Prompt=lts, listed Resolute Raccoon as 26.04.1 LTS and supported. That October check does not establish what your server is offered today. If yours still prints No new release found., that message has other causes worth ruling out.

Check what your box is being offered today:

cat /etc/update-manager/release-upgrades
sudo do-release-upgrade -c

-c only checks and reports. It changes nothing. If it names a new release, the path is open. If it reports none, investigate before using -d: that flag enables development-release checks, but it also enables upgrades to an already released LTS before normal offers are enabled. Canonical explicitly recommended do-release-upgrade -d for early upgrades from 24.04 in the 26.04.1 announcement. What changed in 26.04.1 and when a server should move covers the point release itself. The normal path is open when -c says so, whatever the calendar says.

Two hops from 22.04

If grep VERSION_ID /etc/os-release prints 22.04, the in-place path is two upgrades. The upgrader moves one LTS forward at a time, so 22.04 goes to 24.04, and then 24.04 goes to 26.04, each hop with its own snapshot, its own disabled sources, its own conffile prompts and its own reboot. The 22.04 to 26.04 upgrade walks both hops if you want them. A server that has run since 22.04 has had years of package additions and config edits, though, and the inventory above will show them. Build 26.04 fresh and migrate.

Making the call

Add up the inventory. Zero third-party packages, no holds, a short conffile list, a metapackage-tracked kernel, room on disk, a snapshot you trust, and a 24.04 starting point: upgrade in place, and allow several hours. Anything else on the list, and above all a vendor repository behind a service you rely on: build the new box and migrate. The migration costs more of your time, but every step of it happens with the old server still serving, and every step can be repeated until it is right.

FAQ

Is it safe to run do-release-upgrade over SSH?

Yes, with preparations for losing the connection. As documented on 21 October 2026, the upgrader warned that the session appeared to be running under SSH (secure shell), started a second SSH daemon on port 1022 as a fallback, and ran inside screen. Open the fallback port in the server firewall and in your provider's network firewall before you begin, and have provider console access available. If the connection drops, log back in, run sudo screen -ls to find the session, and reattach it with sudo screen -d -r.

Why does do-release-upgrade say "No new release found" on Ubuntu 24.04?

With Prompt=lts in /etc/update-manager/release-upgrades, a 24.04 server needs an enabled upgrade offer in Canonical's meta-release file. The 26.04.1 point release shipped on 27 August 2026, and as of 21 October 2026 the file listed it as supported. That October check does not confirm today's offer. Run sudo do-release-upgrade -c to see what the box is being offered today. If you still see the message, check that the file does not say Prompt=never and that the server can reach changelogs.ubuntu.com.

Can I skip 24.04 and upgrade from 22.04 straight to 26.04?

No. The upgrader moves from one LTS to the next LTS only, so 22.04 has to pass through 24.04 first. Two upgrades means two snapshots, two rounds of disabled sources, two rounds of config prompts and two reboots. A server that old is the case for a fresh 26.04 install and a migration.

Will my PPAs and third-party repos survive the upgrade?

They are disabled by default, not deleted. As documented on 21 October 2026, the 26.04 upgrader first converted each one-line .list file into a deb822 .sources file of the same name and removed the .list, then set Enabled: no on third-party entries. An entry it could not convert was kept as a comment in a file ending in .disabled. Disabling those sources does not freeze their packages: the upgrade can retain them, replace them with eligible Ubuntu versions, or remove them to resolve dependencies. After the upgrade, re-enable a source only once the vendor publishes builds for 26.04: follow the vendor's current instructions for the repository and suite, then run sudo apt update and sudo apt upgrade. A retained package with no eligible update from an enabled source gets no updates from APT.

Does a snapshot count as a backup for the upgrade?

For the upgrade, yes: it is the roll-back, and you take it minutes before you start to minimise the writes lost if you restore it. Restoring it discards changes made after it was taken. As a backup, no. SSD Nodes stores snapshots on the same node as the server, so keep an independent backup for a host failure. Keep the snapshot until the upgraded server has run cleanly for a few days, then delete it, and keep your real backups off the box either way.

Was this article useful?