Ubuntu release upgrades should be done with do-release-upgrade, while apt should be used for normal package updates inside the same Ubuntu version. APT keeps an installed release healthy, such as moving Ubuntu 22.04 packages to their latest 22.04 builds. do-release-upgrade moves the whole system to a newer Ubuntu release, such as 22.04 LTS to 24.04 LTS. Ubuntu LTS releases receive five years of standard support, which is one reason release timing matters for servers and desktops [source: Ubuntu].
TLDR
APT is for updating packages; do-release-upgrade is for upgrading Ubuntu itself. For example, an office file server on Ubuntu 22.04 may use sudo apt update && sudo apt upgrade weekly, then use sudo do-release-upgrade once it is ready to move to Ubuntu 24.04. In a small admin case, 20 desktops might finish routine APT updates in 10 to 15 minutes each, while a full release upgrade may take 45 to 90 minutes per machine. The safer rule is simple: daily and weekly maintenance uses APT; major version changes use do-release-upgrade.
APT and do-release-upgrade Solve Different Problems
APT is the package management system used by Ubuntu and Debian-based systems. It installs, updates, removes, and repairs software packages. Commands such as apt update, apt upgrade, and apt full-upgrade work with the repositories already configured on the machine.
do-release-upgrade is different. It is a release migration tool. It checks the current Ubuntu version, confirms upgrade eligibility, changes repository targets, calculates package changes, handles obsolete packages, and runs extra upgrade steps. It also warns about third-party repositories, held packages, and services that may restart.
The catch is that both tools can appear to “upgrade” things. That wording causes plenty of avoidable confusion. APT upgrades packages. do-release-upgrade upgrades the operating system release.
What APT Does Best
APT is best for keeping a current Ubuntu release patched and stable. It pulls package lists, compares installed versions, and installs newer builds from active repositories.
Common APT commands include:
sudo apt update: refreshes package lists from configured repositories.sudo apt upgrade: installs available package updates without removing packages.sudo apt full-upgrade: installs updates and may remove or replace packages when needed.sudo apt autoremove: removes unused dependencies left behind after updates.
For routine security work, APT is fast and predictable. A desktop user might run it once a week. A server admin might automate security updates or apply them during a maintenance window. It keeps the system current without changing the release branch.
APT should not be treated as the main release upgrade method. A person can manually edit /etc/apt/sources.list from one codename to another, then run APT commands. That is possible, but it is easy to break package dependencies or miss special upgrade steps. Honestly, it feels like saving two minutes only to risk losing two hours.
What do-release-upgrade Does Best
do-release-upgrade is built for moving from one Ubuntu release to the next supported release. It checks whether the upgrade path is valid. It also uses Ubuntu-specific upgrade logic that APT alone does not provide.
Typical usage looks like this:
sudo apt update
sudo apt upgrade
sudo apt autoremove
sudo do-release-upgrade
On servers, the tool may require the update manager core package:
sudo apt install update-manager-core
It then starts a guided process. The tool may disable third-party repositories, show a package summary, ask for confirmation, and restart services. It may also ask whether to keep or replace modified configuration files.
This matters because release upgrades are not just bigger package updates. Library versions change. Python, PHP, OpenSSL, GNOME, kernels, drivers, and system services may shift. APT can install packages, but do-release-upgrade manages the broader operating system change.
Main Differences at a Glance
| Feature | APT | do-release-upgrade |
|---|---|---|
| Main purpose | Update packages within the current release | Move Ubuntu to a newer release |
| Typical use | Weekly patches and security updates | Major upgrade, such as 22.04 to 24.04 |
| Repository changes | Uses existing repositories | Switches repositories to the new release |
| Risk level | Lower for routine updates | Higher, because core system parts change |
| Best timing | Regular maintenance windows | Planned upgrade window with backups |
When APT Is the Right Choice
APT is the correct tool when the system should stay on the same Ubuntu release. That includes installing security patches, updating browsers, applying kernel updates, or installing new packages from the existing repositories.
A practical example is a production server running Ubuntu 22.04 LTS. If the application stack is certified for 22.04, the admin should keep using APT until the business is ready for 24.04. This approach reduces disruption. It also fits standard patch routines.
APT also works well before a release upgrade. A clean and fully updated system gives do-release-upgrade fewer problems to solve. Held packages, partial upgrades, and old dependencies can slow the process or stop it entirely.
When do-release-upgrade Is the Right Choice
do-release-upgrade is the right choice when the goal is a new Ubuntu release. That includes moving from an older LTS to a newer LTS, or from one interim release to the next.
Before running it, the admin should check backups, free disk space, third-party repositories, and application compatibility. A server with databases, custom drivers, or vendor packages needs extra care. It drives admins crazy when one forgotten repository blocks the upgrade after the system has already spent 12 minutes calculating changes.
A safer upgrade checklist includes:
- Back up data and configuration files.
- Run all pending APT updates first.
- Remove unused packages with
apt autoremove. - Check available disk space.
- Disable or review third-party repositories.
- Use a test machine for critical workloads.
- Plan time for reboots and service checks.
Why Manual APT Release Upgrades Are Risky
Some older guides suggest editing repository codenames by hand and then running apt dist-upgrade or apt full-upgrade. This can work in controlled cases, but it is not the preferred method for common Ubuntu systems.
The reason is simple. Manual editing skips checks. It may not warn clearly about unsupported paths. It may leave third-party packages mixed with official packages. It may also miss release-specific cleanup steps. When the machine is a spare laptop, that risk may be acceptable. When the machine runs payroll, customer data, or production websites, it is a bad trade.
Best Practice for Ubuntu Updates
The best pattern is boring, and that is good. APT should run often. Release upgrades should happen only after planning.
For most systems, the workflow is:
- Use APT weekly for package and security updates.
- Use
do-release-upgradefor supported Ubuntu version changes. - Test major upgrades before applying them to business-critical machines.
- Keep backups current before any major system change.
For desktops, the graphical Software Updater may call the same upgrade process behind the scenes. For headless servers, the command-line tool is usually cleaner. It gives clearer prompts and works well over SSH, though admins should use a reliable session tool such as tmux or screen during long upgrades.
FAQ
Can APT upgrade Ubuntu from 22.04 to 24.04?
APT can install packages from whatever repositories are configured, but it is not the recommended release upgrade tool. do-release-upgrade is safer because it manages Ubuntu release migration steps.
Should APT be run before do-release-upgrade?
Yes. The system should be fully updated first. Running sudo apt update, sudo apt upgrade, and sudo apt autoremove helps reduce upgrade errors.
Is apt full-upgrade the same as do-release-upgrade?
No. apt full-upgrade handles package changes within the configured repositories. do-release-upgrade changes the Ubuntu release and manages the broader upgrade process.
Does do-release-upgrade delete personal files?
It is not designed to delete user files. Still, backups are required before running it. A failed disk, broken package, or bad configuration can still cause data loss.
Which tool should be used on production servers?
APT should be used for regular patching. do-release-upgrade should be used only during a planned maintenance window after backups, testing, and compatibility checks.