How to upgrade from Ubuntu 20.04 to 24.04 Print

  • linux, ubuntu, ubuntu 20.04 upgrade, 24.04
  • 7

Upgrading from Ubuntu 20.04 LTS to Ubuntu 24.04 LTS requires two sequential release upgrades. Ubuntu does not support skipping directly from 20.04 to 24.04 in one in-place upgrade.

The correct path is:

Ubuntu 20.04 LTS -> Ubuntu 22.04 LTS -> Ubuntu 24.04 LTS

This guide walks through the full two-stage upgrade process safely, whether you're upgrading a bare metal server, a cloud VPS, or a local VM.


Upgrading a production server?
Take a snapshot or backup first. If you need a fast Ubuntu VPS for testing or migration, see our KVM VPS across 7 US and EU locations.


Before You Start

Before beginning the upgrade:

  • Back up all important files, databases, and application data
  • Make sure you have sudo access
  • Confirm there is enough free disk space in /boot and /
  • Remove or disable third-party repositories if possible
  • Make sure the current Ubuntu 20.04 system is fully updated

Step 1: Update Ubuntu 20.04

Run the following commands:

sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt install -y update-manager-core
sudo sed -i 's/^Prompt=.*/Prompt=lts/' /etc/update-manager/release-upgrades

Step 2: Upgrade from Ubuntu 20.04 to Ubuntu 22.04

Start the first release upgrade:

sudo do-release-upgrade

Follow the on-screen prompts and allow the upgrade to complete.

 

Tip: Many users test the upgrade path on a fresh Ubuntu VPS before touching production. This helps confirm application compatibility and rollback planning. Owned Networks deploys KVM VPS instances in under 2 minutes with Ubuntu 24.04 pre-installed. You can deploy a test VPS in Miami or choose from any of our US and EU locations.

Step 3: Reboot After the First Upgrade

Once the first upgrade finishes, reboot the server:

sudo reboot

Step 4: Update Ubuntu 22.04

After the server comes back online, update packages again before starting the next upgrade:

sudo apt update && sudo apt upgrade -y
sudo apt dist-upgrade -y
sudo apt autoremove -y
sudo apt install -y update-manager-core
sudo sed -i 's/^Prompt=.*/Prompt=lts/' /etc/update-manager/release-upgrades

Step 5: Upgrade from Ubuntu 22.04 to Ubuntu 24.04

Start the second release upgrade:

sudo do-release-upgrade

Follow the prompts until the upgrade completes.

Step 6: Reboot Into Ubuntu 24.04

Reboot the system again:

sudo reboot

Step 7: Confirm the Upgrade

After rebooting, verify the final OS version:

lsb_release -a

You should see Ubuntu 24.04 LTS in the output.

Optional Cleanup

After the upgrade, remove old unused packages:

sudo apt autoremove --purge -y
sudo apt clean

Related Solution

Need a safer way to upgrade?

Instead of upgrading a live production server immediately, many customers launch a fresh Ubuntu VPS first to test the application, confirm compatibility, and prepare for migration.

  • Deploy in NYC, Miami, Dallas, LA, Seattle, London, or Amsterdam
  • Test Ubuntu 24.04 before cutover
  • KVM virtualization — no noisy neighbors, full root access

Compare VPS Locations and Pricing

Important Notes

  • A direct in-place upgrade from Ubuntu 20.04 LTS to Ubuntu 24.04 LTS is not the supported path
  • If you run do-release-upgrade on Ubuntu 20.04, it will upgrade to Ubuntu 22.04 first
  • After that upgrade is complete, you must run the process again to reach Ubuntu 24.04
  • If you use a control panel, custom kernel, or third-party repositories, review compatibility before upgrading

Need a clean Ubuntu VPS for migration, testing, or replacement? We offer fast virtual servers ideal for Ubuntu 24.04 workloads. See our fast KVM VPS in the US.

Frequently Asked Questions

Can I upgrade Ubuntu 20.04 directly to 24.04?

Not cleanly, no. The supported upgrade path is Ubuntu 20.04 to Ubuntu 22.04 first, then Ubuntu 22.04 to Ubuntu 24.04.

Why does Ubuntu 20.04 upgrade to 22.04 first?

Because Ubuntu LTS release upgrades follow the next supported LTS path rather than skipping directly to a later LTS release.

Should I use do-release-upgrade -d?

No, not for this purpose. For a standard supported LTS upgrade path, use sudo do-release-upgrade and proceed from 20.04 to 22.04, then from 22.04 to 24.04.

Should I back up my VPS before upgrading?

Yes. Always back up important data, configurations, and databases before performing a major OS release upgrade. If your server is hosted on a KVM VPS, your provider may offer snapshot or backup tools — check your control panel before starting. For bare-metal servers, use restic, rsync, or a full disk image.

Is it better to migrate to a fresh Ubuntu 24.04 VPS instead?

In many cases, yes. Deploying a fresh VPS can reduce risk, simplify rollback, and let you validate your application before switching production traffic. If your current host doesn't support Ubuntu 24.04 or lacks snapshot capability, migration is often safer and faster than an in-place upgrade. You can view available options on our KVM VPS page.


Was this answer helpful?

KVM VPS & Dedicated Servers

Deploy a Linux VPS in under 2 minutes — AlmaLinux, Rocky Linux, Ubuntu, Debian. Full root access, KVM virtualization, US and EU locations.

« Back