Upgrade Ubuntu 22.04 to Ubuntu 24.04 LTS
Today, I’m writing a short article to remind you of the steps to follow to upgrade your Ubuntu 22.04 (Jammy Jellyfish) installation to the next LTS version, Ubuntu 24.04 (Noble Numbat).
Version 22.04 will reach its EOL (End of Life) in June 2027. Therefore, by upgrading to 24.04, you’ll gain an additional 2 years of support, as its EOL is set for June 2029.
The schedule for the latest Ubuntu updates is available here: https://wiki.ubuntu.com/Releases
Procedure
- Back up your server
As always, before upgrading your system, I encourage you to make sure you have a current backup.
Aside from the risk that your new system might not boot due to a kernel issue, updating certain packages can break compatibility with configuration settings you’re using.
- Make sure your system is up to date
Now that these precautions are taken, let’s make sure your server is running with the latest available package versions for your current version (in this case, Ubuntu 22.04):
sudo apt update && sudo apt upgrade -y
- Start the upgrade from Ubuntu 22.04 to Ubuntu 24.04 LTS
- Method 1: Use Ubuntu’s upgrade tool
Ubuntu has provided an automatic upgrade tool since version 6.06 LTS (Dapper Drake), allowing this operation to be done with a single command:
sudo do-release-upgrade -d
- Method 2: Update the package list and run a full upgrade
sudo sed -i "s/jammy/noble/g" /etc/apt/sources.list /etc/apt/sources.list.d/*
sudo apt update && sudo apt full-upgrade
- Reboot the server to start with the new kernel
sudo reboot
- Verify the server is running Ubuntu 24.04 (Noble Numbat)
lsb_release -a
Why keep my system up to date?
Benefit from the latest security updates
When your system version is no longer supported, no new updates are released in the repository. As a result, newly discovered and patched security vulnerabilities in a package won’t be available, even after running: sudo apt update && sudo apt upgrade -y
Always have an open and available repository
Let me give you a concrete example that happened with a client’s machine still running Debian 9.
The machine hadn’t been updated for several years, and HTTPS connections had become impossible. A curl command returned:
curl: (60) SSL certificate problem: certificate has expired
The reason for this situation is that the root certificates (included in the ca-certificates package) were no longer up to date. From the system’s perspective, most SSL certificates were invalid, and connections were refused.
At that point, we were left with two options:
- Completely reinstall the system
- Use an installation CD to manually update the root certificates
So, don’t waste your time unnecessarily—keep your system updated regularly!