
How to Safely Upgrade Ubuntu 22.04 to 24.04 LTS (Noble Numbat)
The latest Long-Term Support (LTS) release of Ubuntu is here, bringing a host of new features, performance enhancements, and five years of security updates. Ubuntu 24.04, codenamed “Noble Numbat,” offers a compelling reason to upgrade from the previous LTS version, 22.04 (“Jammy Jellyfish”).
This guide provides a comprehensive, step-by-step process for upgrading your system safely and efficiently using the command line. Whether you are running a server or a desktop, these instructions will ensure a smooth transition.
Before You Begin: Essential Pre-Upgrade Checks
A successful upgrade begins with proper preparation. Rushing this step can lead to data loss or system instability. Before initiating the upgrade, you must complete the following preparations.
- 1. Back Up Your Data: This is the most critical step. Before making any major changes to your operating system, create a full backup of your important files and system configuration. Use your preferred backup tool, like
rsync
, or a cloud service. For servers, consider taking a complete snapshot if your provider offers it. Do not skip this step. - 2. Update Your Current System: The upgrade process requires your existing Ubuntu 22.04 system to be fully up-to-date. This minimizes the risk of package conflicts. Open your terminal and run the following commands:
bash
sudo apt update
sudo apt upgrade -y
sudo apt dist-upgrade -y
- 3. Clean Up Unnecessary Packages: Remove any old kernels or residual packages that are no longer needed. This frees up disk space and streamlines the upgrade.
bash
sudo apt autoremove -y
- 4. Ensure
update-manager-core
is Installed: The upgrade tool is part of this package. Most systems will already have it, but it’s wise to confirm.
bash
sudo apt install update-manager-core
- Security Tip for SSH Users: If you are upgrading a remote server over SSH, it is highly recommended to run the process inside a terminal multiplexer like
screen
ortmux
. This prevents the upgrade from being interrupted if your connection drops, which could leave your system in an unusable state.
The Step-by-Step Upgrade Process
Once your backups are secure and your system is fully updated, you can begin the upgrade to Ubuntu 24.04. The process is largely automated but requires your input at several key points.
Step 1: Launch the Upgrade Tool
With all preparations complete, initiate the upgrade process by running the official release upgrade command:
sudo do-release-upgrade
The tool will first check for a new release. It will then inform you of the packages to be upgraded, installed, and removed.
Step 2: Follow the On-Screen Instructions
The upgrade tool will guide you through several prompts.
- It will first ask for confirmation to start the upgrade process. You will see a summary of changes. Type
y
and press Enter to proceed. - During the upgrade, you may be asked whether to automatically restart services. It is generally safe to allow this.
- You may also encounter prompts about modified configuration files. The system will ask if you want to keep your current version or install the package maintainer’s new version. Read each prompt carefully. In most cases, if you have not manually customized the file, choosing the new version is the best option. If you have made specific changes, you may want to keep your existing file and review the differences later.
The upgrade itself can take some time, depending on your internet connection and system performance. Be patient and do not interrupt the process.
Step 3: Remove Obsolete Packages
Toward the end of the upgrade, the tool will identify and list obsolete packages that are no longer needed. It is safe and recommended to allow their removal to keep your system clean. Confirm by typing y
.
Step 4: Reboot Your System
Finally, you will be prompted to reboot the system to complete the installation. This is a mandatory step.
sudo reboot
Post-Upgrade: Verifying Your New System
After your system reboots, you should be greeted by the new Ubuntu 24.04 environment. To officially verify that the upgrade was successful, open a terminal and run the following command:
lsb_release -a
The output should confirm that you are now running Ubuntu 24.04 LTS:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble
Congratulations! You have successfully upgraded your system. Take some time to explore the new features, updated software, and performance improvements that “Noble Numbat” has to offer.
Source: https://kifarunix.com/easily-upgrade-ubuntu-22-04-to-ubuntu-24-04/