Upgrading Ubuntu from version 22.04 LTS (Jammy Jellyfish) to 24.04 LTS involves several steps to ensure a smooth transition while minimizing risks of issues. Here's a comprehensive guide on how to perform this upgrade safely.
Upgrading from Ubuntu 22.04 to 24.04 is a relatively straightforward process but requires careful preparation and follow-through. By backing up your data, updating your current system, and carefully following the upgrade prompts, you can ensure a smooth transition to the latest Ubuntu LTS release i.e. 24.04.
In case of upgrade failures due to unforeseen reasons or VM doesn't come up after reboot, we recommend customers to create fresh VM with OS Ubuntu 24.04 and deploy/install same CGW to avoid service disruption.
If CGW is already installed on a machine or VM and user wants to upgrade host OS version from Ubuntu 22.04 to 24.04 then they can follow steps, mentioned in this document. CGW service will be up and running while upgrade is happening. Upgrade must be planned during maintenance window to avoid service disruption. Post upgrade, verify that service is working as expected.
Ensure your current system is fully updated. Open a terminal and run:
sudo apt update
sudo apt upgrade -y
This ensures that all your installed packages are up to date, minimizing potential conflicts during the upgrade.
Next, optionally, you can run a full system upgrade to handle package removals and kernel upgrades:
sudo apt dist-upgrade
Reboot the system
sudo reboot
Ensure that the below packages are installed. These packages are necessary for managing the upgrade process.
sudo apt install ubuntu-release-upgrader-core
sudo apt-get --with-new-pkgs upgrade python3-update-manager update-manager-core
Edit the release-upgrades
configuration file to allow normal upgrades.
sudo vi /etc/update-manager/release-upgrades
Change Prompt=normal, save and close the file
Execute below command to upgrade Ubuntu 22.04 to 23.10 release.
sudo do-release-upgrade
Reboot the system
sudo reboot
Execute below command to verify OS version is now 23.10.
lsb_release -a
Edit the release-upgrades
configuration file to allow LTS (Long-Term Support) upgrades.
sudo vi /etc/update-manager/release-upgrades
Change Prompt=lts, save and close the file
This ensures you only get prompts for upgrading to the next LTS release.
Execute below command to upgrade Ubuntu 23.10 to 24.04 release.
sudo do-release-upgrade
Reboot the system
sudo reboot
Execute below command to verify new OS version is now 24.04
lsb_release -a
cgw status
You may check admin console also to verify connection status of CGW.
Remove any packages that are no longer needed:
sudo apt autoremove
Clean up the package cache:
sudo apt clean