do-release-upgrade is the safer default for moving Ubuntu from one release to another, while APT is best for routine package updates inside the same release. Ubuntu’s own server documentation points administrators to do-release-upgrade for release upgrades, especially when moving between LTS versions such as 22.04 and 24.04 [source: Ubuntu]. APT can be used for a release jump, but only after changing repository entries by hand, which is exactly where mistakes tend to creep in.
TLDR: For most systems, do-release-upgrade should handle Ubuntu release upgrades, such as Ubuntu 22.04 LTS to 24.04 LTS. APT should handle normal maintenance with commands like apt update and apt upgrade. In a small office case, an administrator upgrading 18 workstations may save several hours by using do-release-upgrade, because it checks the target release, disables unsupported PPAs, and reports package conflicts before the upgrade starts. APT is faster for weekly updates, often finishing in minutes, but it is not designed as the main release-upgrade workflow.
What each tool is actually for
apt is the daily workhorse. It refreshes package lists, installs security fixes, upgrades applications, and removes packages when asked. Commands like apt update, apt upgrade, and apt full-upgrade keep an Ubuntu system current within its existing release.
do-release-upgrade is different. It is part of Ubuntu’s release upgrade process. It checks whether a newer Ubuntu release is available, prepares the package manager, adjusts software sources, warns about removed packages, and runs the upgrade in a controlled flow.
The catch is that both tools touch packages, so they can look similar from a distance. They are not the same tool for the same job.
Why do-release-upgrade is usually the right choice
A release upgrade is messy. Repository names change. Package versions jump. Kernel packages may change. Old dependencies disappear. Some third-party repositories stop matching the new Ubuntu release.
do-release-upgrade expects that mess. It asks Ubuntu’s upgrade service which release is available. It checks for known upgrade blockers. It comments out many third-party sources. It shows a summary before changes are committed. That summary may include how many packages will be upgraded, installed, removed, or left untouched.
- Best for: Ubuntu 22.04 LTS to 24.04 LTS, or 23.10 to 24.04.
- Good on: servers, desktops, virtual machines, and cloud instances.
- Main benefit: fewer manual repository edits.
- Main drawback: it can be slow, chatty, and strict about broken packages.
Honestly, it feels like do-release-upgrade asks one more question than expected just when the admin wants to leave for lunch. Still, those questions often prevent a worse failure later.
Where APT fits
APT should not be dismissed. It is the correct tool for normal maintenance. A healthy Ubuntu machine should receive security and bug-fix updates often. A typical routine looks like this:
sudo apt update
sudo apt upgrade
sudo apt autoremove
apt update refreshes package indexes. apt upgrade installs available upgrades without removing packages. apt full-upgrade can remove or install packages to complete a larger upgrade. That can be useful for kernel updates or dependency changes.
APT can perform a release upgrade if repository files are edited from one codename to another, such as from jammy to noble. Then an administrator can run apt update and apt full-upgrade. This is common in Debian workflows, but it is not the usual Ubuntu recommendation for standard systems.
That manual method creates room for small, annoying failures. One forgotten PPA can break the upgrade. One old repository can throw 404 errors. One pinned package can hold back half the desktop. Expect to waste time on that if the machine has years of old software sources.
Practical comparison
| Task | Best tool | Reason |
|---|---|---|
| Install security updates | apt |
Fast and routine |
| Upgrade Ubuntu 22.04 to 24.04 | do-release-upgrade |
Built for release transitions |
| Fix held packages | apt |
Better package-level control |
| Server LTS upgrade over SSH | do-release-upgrade |
Includes safer upgrade handling |
Before any Ubuntu release upgrade
The tool choice matters, but preparation matters more. A clean system upgrades better than a neglected one. Administrators should start by applying current updates:
sudo apt update
sudo apt upgrade
sudo apt autoremove
They should also check disk space. A release upgrade can download several gigabytes of packages. On small cloud instances, /boot and /var can run out of space at the worst possible moment.
- Create a backup or snapshot before starting.
- Remove unused PPAs and old repository files.
- Check held packages with
apt-mark showhold. - Read release notes for service changes and removed packages.
- Run the upgrade in a stable session, especially on remote servers.
Ubuntu LTS releases are designed for long service periods, with standard support for five years on the main Ubuntu archive [source: Ubuntu]. That makes LTS-to-LTS upgrades common for businesses, labs, and home servers.
When APT may still be useful during a release upgrade
Even when do-release-upgrade is the main tool, APT still helps before and after the process. Before the upgrade, it cleans the system. After the upgrade, it can fix missing packages, remove leftovers, and install new versions of software that were skipped.
Common post-upgrade commands include:
sudo apt update
sudo apt full-upgrade
sudo apt autoremove
sudo apt autoclean
The administrator should also inspect services. A web server, database, VPN service, or container engine may need a config review after a major release jump. Package upgrades may preserve old config files, but system defaults can still change.
Best recommendation
For an ordinary Ubuntu release upgrade, administrators should use do-release-upgrade. It matches Ubuntu’s upgrade process and reduces manual repository editing. APT should remain the tool for routine updates, cleanup, and repair work.
The simple rule is this: APT maintains the current release; do-release-upgrade moves the system to the next release. That rule prevents most confusion.
FAQ
Is do-release-upgrade safer than using APT?
For Ubuntu release upgrades, yes. It performs checks that plain APT does not handle on its own.
Can APT upgrade Ubuntu from one release to another?
Yes, but it requires manual repository changes. That method is more error-prone on Ubuntu systems with PPAs or custom packages.
Should apt full-upgrade be run every week?
Not always. apt upgrade is safer for routine updates. apt full-upgrade is useful when dependency changes require package removals or new packages.
Does do-release-upgrade delete user files?
It is not meant to delete user data. Still, backups are required. A failed disk, bad package script, or interrupted upgrade can still cause damage.
What should an administrator do if the upgrade fails?
They should avoid rebooting too quickly. First, they should check package status with dpkg --configure -a, then run apt -f install, and review logs in /var/log/dist-upgrade/.
