Situatie
Backup
First, you must update and upgrade all your system packages to the latest version. Run the following command to update and upgrade all packages:
apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y
Next, remove all unwanted packages with the following command:
apt-get autoremove
Next, clean up the APT package cache with the following command:
apt-get clean
Next, restart your system to apply all updates:
reboot
Update to Ubuntu 24.04 using the do-release-upgrade tool
Now we can upgrade to Ubuntu 24.04 using the do-release-upgrade tool. Run this command:
do-release-upgrade
Go through the upgrade steps shown on the screen. The tool will query you for input every now and then and will only continue after you choose/confirm an option.
When the tool is done, reboot your server. If this has not been done during the upgrade process, do it manually:
reboot
Re-enable external repositories
If you had any extra repositories configured, these will be disabled after using the do-release-upgrade tool. To check if you have such repositories, list the content of the sources.list.d directory:
ls -la /etc/apt/sources.list.d/
If there are any .list or .list.distUpgrade files in this directory, check with the maintainer of the relevant repository/repositories to see what the correct configuration if for Ubuntu 24.04 (jammy). After updating the file(s) accordingly, run:
apt update
apt upgrade
Verify Ubuntu 24.04 Upgrade
At this point, your server is upgraded to Ubuntu 24.04. You can now verify it using the following command:
lsb_release -a
You should see the Ubuntu version in the following output:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 24.04.1 LTS
Release: 24.04
Codename: noble
Leave A Comment?