Skip to main content

WP 301 Redirects

Use do-release-upgrade when you want to move Ubuntu from one version to the next. Use APT when you want to update apps, security fixes, and system packages inside the version you already have.

TLDR: do-release-upgrade is the safe Ubuntu upgrade command for jumping from Ubuntu 22.04 to 24.04, or from 23.10 to 24.04. APT is best for regular updates, like installing 156 package fixes on your current system. Example: if Mia manages 12 laptops, she runs sudo apt update && sudo apt upgrade every week, but runs sudo do-release-upgrade only when the whole office is ready for a new Ubuntu release. Mixing the two jobs can get messy fast.

The simple version

Think of Ubuntu like a house.

  • APT fixes the furniture, lights, locks, and pipes.
  • do-release-upgrade moves you into a newer house.

Both are useful. They just do different jobs.

APT keeps your current Ubuntu release healthy. It downloads new package lists. It installs newer versions of installed software. It applies security patches. It removes old bits when needed.

do-release-upgrade does the big jump. It changes your Ubuntu release. It checks upgrade paths. It disables some third party software sources. It asks questions. It tries to keep your system alive while swapping the floor under your feet.

What APT actually does

APT stands for Advanced Package Tool. Fancy name. Simple job.

You use it for normal system care:

sudo apt update
sudo apt upgrade

The first command refreshes the package list. It asks, “What new stuff exists?”

The second command installs available updates. It asks, “What can I safely update now?”

You may also see this:

sudo apt full-upgrade

This can install updates that need package removals or extra changes. It is stronger than apt upgrade. Still, it does not mean “upgrade Ubuntu to the next release.” That name causes confusion. Honestly, it feels like someone named the buttons during a coffee shortage.

APT is great for daily work. It is fast. It is direct. It is boring in the best way.

What do-release-upgrade actually does

do-release-upgrade is the official Ubuntu tool for release upgrades.

Use it when moving between Ubuntu versions. For example:

  • Ubuntu 22.04 LTS to Ubuntu 24.04 LTS
  • Ubuntu 23.10 to Ubuntu 24.04
  • Ubuntu Server 20.04 LTS to 22.04 LTS

The command is simple:

sudo do-release-upgrade

It checks if a new release is available. It reads your current setup. It calculates package changes. It warns you before the big work starts.

It may ask about config files. It may pause for your answer. It may remove old packages. It may take 30 minutes. It may take two hours on a slow server. Expect to waste time on old PPAs if you have collected them like fridge magnets.

APT vs do-release-upgrade: the quick fight card

TaskUse APT?Use do-release-upgrade?
Install security updatesYesNo
Update installed appsYesNo
Move from 22.04 to 24.04NoYes
Clean unused packagesYesSometimes
Fix package dependency issuesUsuallyNo

Can APT upgrade Ubuntu versions?

Technically, there are ways to force a release change with APT. You can edit software source files. You can replace release names. You can run apt full-upgrade after that.

Should you do that?

Usually, no.

That path is brittle. It skips helpful checks. It can leave you with broken packages. It can also make support harder. Ubuntu provides do-release-upgrade for a reason. Use the tool built for the job.

APT is not “bad” here. It is just the wrong wrench. You can stir soup with a screwdriver. Please do not.

Best command sequence before a release upgrade

Before running do-release-upgrade, clean up your current system.

Run this first:

sudo apt update
sudo apt upgrade
sudo apt full-upgrade
sudo apt autoremove

Then reboot:

sudo reboot

After the reboot, start the release upgrade:

sudo do-release-upgrade

This gives the upgrader a cleaner starting point. Fewer broken bits. Fewer weird conflicts. Less yelling at the screen.

What about Ubuntu desktop upgrades?

On Ubuntu Desktop, you may see a pop-up. It says a new Ubuntu release is available. That graphical tool uses the same general upgrade system under the hood.

If you like buttons, use the pop-up. If you like clear logs and terminal control, use:

sudo do-release-upgrade

Both paths can work. The terminal is often better for remote machines. It is also better when you want to see what is happening.

What about Ubuntu servers?

For servers, do-release-upgrade is the normal choice.

Still, be careful. A server is not a toy box. Check services first. Check disk space. Check backups. Check firewall rules. Check database status.

A safe server plan might look like this:

  1. Take a snapshot or full backup.
  2. Update the current system with APT.
  3. Reboot and test services.
  4. Run sudo do-release-upgrade.
  5. Reboot again.
  6. Test web apps, SSH, databases, cron jobs, and logs.

If this is a production server, test the upgrade on a copy first. A 45 minute test can save a 4 hour panic.

Common problems and quick fixes

No new release found?

Check your upgrade settings:

cat /etc/update-manager/release-upgrades

For LTS upgrades, you may see:

Prompt=lts

For normal releases, you may need:

Prompt=normal

Third party repositories causing trouble?

Disable PPAs before the upgrade. Add them back later, only if they support the new Ubuntu release.

Not enough disk space?

Clean old packages:

sudo apt autoremove
sudo apt clean

Upgrade interrupted?

Try:

sudo dpkg --configure -a
sudo apt --fix-broken install

Then read the messages. The boring text often tells you exactly what is stuck.

Which command should you remember?

Remember this tiny rule:

  • Same Ubuntu version? Use APT.
  • New Ubuntu version? Use do-release-upgrade.

So your weekly update command is:

sudo apt update && sudo apt upgrade

Your big version jump command is:

sudo do-release-upgrade

That is the heart of it.

Final answer

APT is your regular maintenance buddy. It keeps Ubuntu patched, fresh, and secure inside the current release. Use it often.

do-release-upgrade is your moving truck. It takes you from one Ubuntu release to another. Use it when you are ready for the bigger trip.

Back up first. Update first. Reboot first. Then upgrade. Future you will be less annoyed.