Ubuntu Terminal Upgrade: APT vs do-release-upgrade for Updating Ubuntu

Use APT for routine package updates, and use do-release-upgrade when moving Ubuntu to a new version. Mixing the two up is a common cause of broken upgrades, held packages, and wasted maintenance windows. Ubuntu LTS releases receive five years of standard security maintenance, which makes the upgrade plan a real operations decision, not just a command choice [source: Ubuntu].

TLDR: apt update and apt upgrade update software inside your current Ubuntu release, such as Ubuntu 22.04. do-release-upgrade upgrades the operating system itself, such as moving from 22.04 LTS to 24.04 LTS. For example, a small office with 25 Ubuntu laptops may run APT weekly, but schedule do-release-upgrade once every two years for an LTS jump. If uptime matters, test the release upgrade on one machine first, because one bad driver or third-party repository can delay the process by 30 minutes or more.

APT and do-release-upgrade solve different problems

APT is Ubuntu’s package management system. It installs, removes, and updates software packages from configured repositories. When you run sudo apt update, Ubuntu refreshes its package index. When you run sudo apt upgrade, it installs newer versions of installed packages, but stays within the same Ubuntu release.

do-release-upgrade is different. It is the supported terminal tool for upgrading from one Ubuntu release to another. It changes repository targets, checks upgrade rules, calculates package transitions, disables incompatible third-party sources, and guides the system through a major version upgrade.

That difference matters. APT keeps your current house repaired. do-release-upgrade moves you into a newer house.

Image not found in postmeta

When to use APT

Use APT for normal maintenance. This includes security fixes, browser updates, kernel updates, library patches, and application updates supplied for your current Ubuntu version.

A safe routine looks like this:

  • sudo apt update refreshes package information.
  • apt list --upgradable shows what can be updated.
  • sudo apt upgrade applies standard updates.
  • sudo apt full-upgrade allows package removals when needed, often for kernel or dependency changes.
  • sudo apt autoremove removes old packages no longer needed.

For desktops, weekly APT updates are usually reasonable. For internet-facing servers, security updates should be checked more often. Many administrators automate this with unattended upgrades, but manual review is still useful on production systems.

APT does not upgrade Ubuntu from 22.04 to 24.04. It may update hundreds of packages, but it remains inside the release channels already configured on the system. If your machine says it is Ubuntu 22.04 before APT updates, it will still be Ubuntu 22.04 after them.

When to use do-release-upgrade

Use do-release-upgrade when you want to move from one Ubuntu version to the next supported release. Common examples include:

  • Ubuntu 20.04 LTS to 22.04 LTS
  • Ubuntu 22.04 LTS to 24.04 LTS
  • A non-LTS release to the next available release

The usual command is simple:

sudo do-release-upgrade

On servers, you may need to install the upgrader first:

sudo apt install update-manager-core

Then check /etc/update-manager/release-upgrades. The Prompt setting controls which upgrades are offered:

  • Prompt=lts offers only LTS upgrades.
  • Prompt=normal offers regular release upgrades.
  • Prompt=never disables release upgrade prompts.

Honestly, it feels like one of those small config files that should not waste your afternoon, but it can. If do-release-upgrade says no new release is found, this setting is one of the first places to check.

Why not just edit sources.list and run APT?

You may see old advice that suggests editing /etc/apt/sources.list, replacing the release codename, and running apt full-upgrade. That method is risky. It skips checks that do-release-upgrade performs for package transitions, obsolete packages, third-party repositories, and upgrade blockers.

It may work on a clean test VM. It may also leave a real workstation with mixed packages and a login screen that no longer starts. That is not a fun way to spend a Friday evening.

do-release-upgrade exists because release upgrades are not just big package updates. They are controlled migrations. The tool handles prompts, warns about unsupported packages, and gives the administrator a clearer view of what will change.

Image not found in postmeta

Best terminal workflow before any Ubuntu upgrade

Before using either method, start with a clean system. This lowers the chance of dependency problems.

  1. Back up important data. Include databases, home directories, configuration files, SSH keys, and application data.
  2. Update the current system first.
sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove
  1. Reboot if a new kernel was installed.
  2. Check disk space. Release upgrades need free space in /, /boot, and sometimes /var.
  3. Disable or review third-party repositories. PPAs, vendor repos, and old drivers are frequent trouble spots.
  4. Read the proposed changes. Do not just press Enter through every prompt.

For remote servers, run the upgrade inside screen or tmux. A dropped SSH session during a release upgrade is exactly the kind of boring disaster that still ruins real systems.

APT upgrade vs full-upgrade

apt upgrade is conservative. It upgrades packages when doing so does not require removing installed packages. This is suitable for frequent updates.

apt full-upgrade is more aggressive. It can remove packages to complete dependency changes. This is often needed before a release upgrade, especially when kernels or core libraries are involved.

Use full-upgrade carefully. Read the removal list. If it wants to remove your desktop environment, database server, or core application stack, stop and investigate.

Common mistakes

  • Running only apt upgrade for years. This keeps packages patched, but the Ubuntu release can still reach end of standard support.
  • Ignoring held packages. Check with apt-mark showhold. Held packages can block upgrades.
  • Forgetting third-party repositories. Docker, graphics drivers, database repos, and old PPAs often need manual review.
  • Upgrading without backups. Serious administrators do not treat backups as optional.
  • Skipping release notes. Removed packages and service behavior changes can affect production workloads.

Which command should you choose?

Choose APT when your goal is to keep the current Ubuntu release secure and current. It is the right tool for routine maintenance, patching, and package updates.

Choose do-release-upgrade when your goal is to move to a newer Ubuntu release. It is the right tool for version upgrades and should be planned, tested, and monitored.

A practical rule is simple: APT is weekly maintenance; do-release-upgrade is a scheduled project. On personal laptops, that project may take an hour. On business servers, it may require a test clone, a rollback plan, and a maintenance window.

Image not found in postmeta

Final recommendation

Keep Ubuntu healthy with regular APT updates, but do not expect APT to replace the release upgrader. Before a major upgrade, patch the existing system, back up data, remove obvious clutter, and test if the machine matters. Then use do-release-upgrade for the actual release change.

This approach is less exciting, but it is safer. It also gives you a clear answer when something goes wrong: package updates are handled by APT, and operating system release moves are handled by do-release-upgrade. That split keeps Ubuntu maintenance predictable and easier to support.