How to upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS ?
This blog will show you the steps to update from ubuntu 22 to Ubuntu 24.
To upgrade from Ubuntu 22.04 LTS to Ubuntu 24.04 LTS via the terminal, you should use the official release upgrade tool. Because both are Long Term Support (LTS) releases, this process is designed to keep your files and configurations safe, but you should always back up critical data first.
Step 1: Fully Update Your Current System
sudo apt update && sudo apt dist-upgrade -y
After the updates finish, remove any unnecessary leftover packages and reboot your machine:
sudo apt autoremove -y
sudo reboot
Step 2: Install the Core Upgrade Tool
Ensure you have the official upgrade utility installed on your system:
sudo apt install update-manager-core
Step 3: Run the Distribution Upgrade
sudo do-release-upgrade
If no upgrade is found: Ubuntu staggered the initial 24.04 upgrade path. If it tells you no new release is found and you want to force the upgrade anyway, run it with the development flag:
sudo do-release-upgrade -d
If you are on a remote server (like SSH): The system will open an additional fallback port (usually 1022) in case your connection drops. Press y to continue.
Step 4: Follow the On-Screen Prompts
During the upgrade, the terminal will ask for your confirmation several times:
- It will show you a summary of packages to be downloaded, installed, and removed. Press y to start.
- It may ask whether to keep your old configuration files or replace them with new ones. If you haven't customized them, choosing the default (Keep/No) is usually safest.
- At the end, press y to remove obsolete packages, and then y to reboot.
Once your system restarts, you can verify your new version by running
lsb_release -a