How to Upgrade From Ubuntu 22.04 to 24.04: Step-by-Step Guide

Are you ready to upgrade from Ubuntu 22.04 to Ubuntu 24.04? Let’s do it together!

Pre-requisites:

Check the currently installed Ubuntu version on your system:

hostnamectl
checking current version of ubuntu

Step 1: Backup your Data

Backup your important data to prevent any loss if there is any problem while upgrading Ubuntu 22.04 to 24.04.

Step 2: Update Packages List

Update the list to the latest versions of packages installed on your system: 

sudo apt update -y
updating system packages of ubuntu

Step 3: Upgrade the Packages

Now, upgrade the packages installed on your system:

sudo apt upgrade -y
upgrading packages on ubuntu

Step 4: Open TCP Port

In case you are upgrading through SSH, open the TCP Port 1022 to ensure a stable connection:

sudo ufw allow 1022/tcp
allowing tcp port 1022 on ubuntu

Apply the changes made to the Firewall rules:

sudo ufw reload
reloading firewall rules in ubuntu

Verify the changes:

sudo ufw status
checking current firewall status on ubuntu

Step 5: Reboot

Next, reboot the system via the terminal or manually:

reboot
rebooting ubuntu system

How to Upgrade from Ubuntu 22.04 to 24.04?

first, upgrade the system from Ubuntu 22.04 to 23.10, then switch to Ubuntu 24.04.

Step 1: Install Update Manager Core

Execute the mentioned command to install Update Manager Core tool on the system:

sudo apt install update-manager-core
installing update manager core in ubuntu

Step 2: Change Prompt to Normal

Open its configuration file using any text editor:

sudo nano /etc/update-manager/release-upgrades
editing release upgrades configuration file in nano editor

Now, look for “Prompt” and change it to “normal”:

Prompt=normal
setting prompt value to normal in release upgrades configuration file of ubuntu

Step 3: Start the Upgrading

Begin the upgrading process using this command:

sudo do-release-upgrade
checking for a new release

During the upgrade process, enter “y” each time when asked to continue:

continuing the upgrade process on ubuntu

Enter “N”:

allowing to install an upgrade on ubuntu

Ubuntu is upgraded to version 23.10 successfully:

checking current version of ubuntu 23.10

Step 4: Upgrade to Ubuntu 24.04

Repeat the same process of editing the configuration file, but with “Prompt=lts”:

sudo nano /etc/update-manager/release-upgrades
editing release upgrade file in nano editor
Prompt=lts
setting prompt value in release upgrades configuration file

Start upgrading from Ubuntu 23.10 to 24.04 via this command:

sudo do-release-upgrade
starting upgrading process to ubuntu 24.04

If you are getting the above error while upgrading Ubuntu, execute this command:

sudo do-release-upgrade -d
checking for a ubuntu release to upgrade

Repeat the process followed when upgrading from Ubuntu 22.04 to 23.10. Finally, restart the system:

continuing the upgrade process on ubuntu

Ubuntu 22.04 is upgraded to Ubuntu 24.04 successfully:

Let us know if you encounter problems with the upgrade process.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top