Skip to main content

WP 301 Redirects

Use do-release-upgrade for Ubuntu release upgrades. Use APT for normal package updates inside your current release. That is the clean rule. Ubuntu’s own upgrade guide points users to do-release-upgrade for moving to a new Ubuntu version [source: Ubuntu].

TLDR: do-release-upgrade is the safer tool when moving from Ubuntu 22.04 to 24.04, or from 23.10 to 24.04. APT is great for daily updates, like installing 42 security fixes on your current system. Example: if a small office has 10 Ubuntu laptops on 22.04 LTS, they should run sudo apt update first, then use sudo do-release-upgrade for the big jump. Do not just edit sources.list and hope the penguin gods smile.

Two tools, two jobs

Ubuntu gives you more than one way to upgrade things. That sounds nice. It can also make your brain itch.

Here is the simple split:

  • APT updates packages within your current Ubuntu release.
  • do-release-upgrade upgrades the whole system to a newer Ubuntu release.

Think of APT as changing the tires, oil, and wiper blades. Think of do-release-upgrade as trading the car for a newer model. Both involve tools. Only one should be used for the big swap.

What APT actually does

APT is the package manager. It talks to Ubuntu software repositories. It installs packages. It removes packages. It upgrades packages.

These commands are normal APT work:

  • sudo apt update
  • sudo apt upgrade
  • sudo apt full-upgrade
  • sudo apt install nginx
  • sudo apt remove vlc

apt update refreshes the package list. It does not upgrade anything by itself. That part still annoys new users. The name sounds like it should update the system. Nope. It updates the shopping list.

apt upgrade installs newer versions of packages. apt full-upgrade can also remove packages if needed. That makes it stronger. It is useful before a release upgrade.

But APT stays inside the release you already use. If you are on Ubuntu 22.04, APT pulls packages made for 22.04. It does not magically become 24.04.

What do-release-upgrade does

do-release-upgrade is the official release upgrade tool for Ubuntu systems. It checks if a new Ubuntu release is available. Then it plans the upgrade.

It does a lot of boring work for you. Good boring. The kind that saves your Saturday.

It can:

  • Check the next supported Ubuntu release.
  • Read release upgrade rules.
  • Disable many third-party repositories.
  • Calculate package changes.
  • Warn about removals.
  • Run the upgrade in stages.
  • Help recover from some interrupted upgrades.

APT is still involved under the hood. That is the funny bit. do-release-upgrade does not replace APT. It manages APT during a risky operation.

So the real question is not “APT or do-release-upgrade?” It is “Do I want the adult in the room?” For release upgrades, yes. Yes you do.

The risky APT-only method

Some users edit /etc/apt/sources.list. They replace one Ubuntu codename with another. For example, they replace jammy with noble. Then they run:

sudo apt update
sudo apt full-upgrade

This can work. Sometimes. It is also how you create a small digital swamp.

The catch is that Ubuntu releases are not just package lists. They also include upgrade rules, package transitions, removed packages, new defaults, and service changes. APT alone does not know all the upgrade policy steps that Ubuntu’s release upgrader applies.

Expect to waste time on weird breakage if you use the manual method. Maybe your desktop loses a package. Maybe a PPA blocks half the upgrade. Maybe a config prompt appears at the worst possible moment. Maybe nothing boots, and now your coffee tastes like regret.

Best upgrade flow

Here is the sane path. It is not fancy. That is the point.

  1. Back up your files. Really. Do it first.
  2. Update your current system.
  3. Reboot if needed.
  4. Run the release upgrader.
  5. Review removed packages.
  6. Reboot again.

Use these commands:

sudo apt update
sudo apt full-upgrade
sudo reboot

Then run:

sudo do-release-upgrade

If you are on a server, run it inside tmux or screen. A dropped SSH session during an upgrade is the kind of drama nobody ordered.

LTS upgrades have a timing quirk

Ubuntu LTS releases are supported for years. Many users move from one LTS to the next. For example, from 22.04 LTS to 24.04 LTS.

But the upgrade may not appear on day one for every LTS user. Ubuntu often waits until the first point release before offering the upgrade through normal channels. That gives early bugs time to get squashed. Annoying? A bit. Sensible? Also yes.

You can check your release upgrade setting here:

cat /etc/update-manager/release-upgrades

You may see:

Prompt=lts

That means your system looks only for LTS releases. If you want every regular Ubuntu release, use:

Prompt=normal

Do not switch this on a production server just because you are bored. Boredom is not a change plan.

When should you use APT?

Use APT all the time for normal maintenance.

  • Security updates? Use APT.
  • Bug fixes? Use APT.
  • New Firefox package? Use APT.
  • Installing Docker dependencies? Use APT.
  • Cleaning unused packages? Use APT.

APT is fast and familiar. On a healthy home laptop, sudo apt update may take only a few seconds. A full package upgrade may take minutes. It depends on your connection and disk speed.

Use this often:

sudo apt update
sudo apt upgrade

Use this when package removals may be needed:

sudo apt full-upgrade

When should you use do-release-upgrade?

Use do-release-upgrade when changing Ubuntu versions.

  • 22.04 to 24.04? Use it.
  • 23.10 to 24.04? Use it.
  • A cloud server moving to a new base release? Use it.
  • A desktop with lots of snaps, drivers, and PPAs? Still use it.

You can check for a new release with:

do-release-upgrade -c

If you are testing a development release, there is also:

sudo do-release-upgrade -d

Do not use -d on your main work machine unless you enjoy surprise puzzles.

What about PPAs and third-party repos?

PPAs are where upgrades get spicy. A PPA may not support the new Ubuntu release yet. A vendor repo may still point to the old codename. A graphics driver package may block other packages.

do-release-upgrade usually disables third-party sources during the upgrade. That is helpful. It reduces chaos. After the upgrade, you can enable them again if they support the new release.

APT alone will not be as careful. It will read whatever sources you gave it. If those sources are a mess, APT will faithfully carry that mess into battle.

Quick comparison

TaskUse APTUse do-release-upgrade
Install app updatesYesNo
Install security fixesYesNo
Move to a new Ubuntu releaseNoYes
Handle release upgrade checksNoYes
Manage third-party repo riskWeaklyBetter

The simple rule

APT keeps your current Ubuntu release healthy. do-release-upgrade moves you to the next release.

Run APT first. Clean up your system. Reboot. Then let do-release-upgrade handle the big jump.

That is the least dramatic path. Your packages will thank you. Your weekend will thank you. Your future self, staring at a working login screen, will definitely thank you.