
Ubuntu 25.04 introduces key advancements for modern workloads, including the Linux 6.14 kernel, systemd v257.4, and an updated virtualization stack with QEMU 9.2 and libvirt 11.0. Developers benefit from LLVM v20, OpenJDK 24, and the latest database versions like MySQL 8.4 and PostgreSQL 17. Enhanced security is provided by expanded AppArmor profiles and Chrony with NTS for secure time synchronization. By upgrading from Ubuntu 24.04 to 25.04, users can take advantage of improved performance, better developer tooling, and reinforced system security.
This article explains the process of upgrading from Ubuntu 24.04 (LTS) to Ubuntu 24.10 (Non-LTS), and then from Ubuntu 24.10 to Ubuntu 25.04 (Non-LTS). The upgrade process involves updating your system and ensuring compatibility with the new release.
Prerequisites
Before you begin, you need to:
Have access to an existing Ubuntu 24.04 instance as a non-root sudo user.
Ensure that you've at least 5GB of free disk space is available.
console$ df -h
Your output should be similar to the one below:
Filesystem Size Used Avail Use% Mounted on tmpfs 794M 1.3M 793M 1% /run efivarfs 256K 23K 229K 10% /sys/firmware/efi/efivars /dev/vda2 150G 13G 131G 9% / tmpfs 3.9G 0 3.9G 0% /dev/shm tmpfs 5.0M 0 5.0M 0% /run/lock /dev/vda1 511M 6.2M 505M 2% /boot/efi tmpfs 794M 12K 794M 1% /run/user/1001
Check the Compatibility of Installed Applications
Before proceeding with the upgrade, it’s essential to ensure that the applications currently installed on your system are compatible with Ubuntu 25.04. Upgrading to an incompatible version can lead to issues such as runtime errors or conflicts between packages. Below are the steps to review the installed applications and confirm their compatibility.
Create a list of all installed application packages.
console$ sudo dpkg --get-selections > packages-list.txt
Review the list of installed applications packages and verify that the packages are compatible with the new version of Ubuntu.
console$ cat packages-list.txt | more
Visit the official documentation for each package to confirm that they are compatible with Ubuntu 25.04. Additionally, consult the Ubuntu 25.04 release notes to identify any known issues or dependencies that may cause problems during or after the upgrade.
Prepare the Server for Upgrade
Before starting the upgrade process, ensure that the APT package manager repositories are up to date and all existing packages are upgraded to their latest versions. Follow these steps below to prepare your system for the upgrade.
Verify that your system is running on Ubuntu 24.04 by checking it's distribution version.
console$ cat /etc/os-release
Your output should be similar to the one below:
PRETTY_NAME="Ubuntu 24.04.2 LTS" NAME="Ubuntu" VERSION_ID="24.04" VERSION="24.04.2 LTS (Noble Numbat)" VERSION_CODENAME=noble ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=noble LOGO=ubuntu-logo
Update your APT server's index.
console$ sudo apt update
Ensure that all installed packages are updated to their most recent versions.
console$ sudo apt upgrade -y
After all packages are upgraded to the latest versions, reboot the server to apply the changes.
console$ sudo reboot
Clean up any unnecessary packages that are no longer needed.
console$ sudo apt autoremove -y
Remove old package files from the local cache to free up space.
console$ sudo apt autoclean
Enable the Temporary SSH Port
During the upgrade from Ubuntu 24.04, the system may open a fallback SSH port (1022
) to prevent being disconnected if the primary SSH session is interrupted. Enabling this port ensures you can reconnect and monitor the upgrade process remotely if needed. Follow the steps below to allow access to port 1022
using the UFW firewall.
Open port to allow incoming connections on TCP port
1022
.console$ sudo ufw allow 1022/tcp
Reload the UFW firewall to apply changes.
console$ sudo ufw reload
View the firewall status to verify that connections to port
1022
are allowedconsole$ sudo ufw status
Your output should be similar to the one below:
Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 1022/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 1022/tcp (v6) ALLOW Anywhere (v6) ......
Upgrade from Ubuntu 24.04 to 24.10
Ubuntu 24.10 is a non-LTS (interim) release. By default, LTS systems like Ubuntu 24.04 do not automatically upgrade to non-LTS versions. You must explicitly allow upgrades to new release versions to perform this upgrade. Follow the steps below to upgrade your server from Ubuntu 24.04 to 24.10.
Open the release upgrade configuration file.
console$ sudo vim /etc/update-manager/release-upgrades
Change the
Prompt
value fromlts
tonormal
to allow non-LTS upgrades.iniPrompt=normal
Begin the upgrade process.
console$ sudo do-release-upgrade
When prompted, enter Y and press Enter to confirm the upgrade to Ubuntu 24.10.
Checking for a new Ubuntu release = Welcome to Ubuntu 24.10 'Oracular Oriole' = The Ubuntu team is proud to announce Ubuntu 24.10 'Oracular Oriole'. To see what's new in this release, visit: https://wiki.ubuntu.com/OracularOriole/ReleaseNotes ...... To sign up for future Ubuntu announcements, please subscribe to Ubuntu's very low volume announcement list at: http://lists.ubuntu.com/mailman/listinfo/ubuntu-announce Continue [yN]
Enter Y and press Enter to temporarily enable the SSH port
1022
.Reading cache Checking package manager Continue running under SSH? This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover. If you continue, an additional ssh daemon will be started at port '1022'. Do you want to continue? Continue [yN]
Accept the additional firewall rules and press Enter to continue.
Starting additional sshd To make recovery in case of failure easier, an additional sshd will be started on port '1022'. If anything goes wrong with the running ssh you can still connect to the additional one. If you run a firewall, you may need to temporarily open this port. As this is potentially dangerous it's not done automatically. You can open the port with e.g.: 'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' To continue please press [ENTER]
When prompted to begin the upgrade, enter Y and press Enter.
Do you want to start the upgrade? 40 new packages are going to be installed. 572 packages are going to be upgraded. You have to download a total of 1,220 M. This download will take about 3 minutes with your connection. Installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled. Continue [yN] Details [d]
When prompted about the
/etc/systemd/journald.conf
file, press Enter to select the default optionN
and retain the existing configuration.Configuration file '/etc/systemd/journald.conf' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** journald.conf (Y/I/N/O/D/Z) [default=N] ?
Use the arrow keys to select your desired country of origin for the keyboard and press Enter to proceed.
Select the appropriate layout for your keyboard and press Enter to proceed.
When prompted about modifying
/etc/default/grub
, select keep the local version currently installed and press Enter.Press Enter to keep the existing
/etc/update-manager/release-upgrades
configuration when prompted.Configuration file '/etc/update-manager/release-upgrades' ==> Modified (by you or by a script) since installation. ==> Package distributor has shipped an updated version. What would you like to do about it ? Your options are: Y or I : install the package maintainer's version N or O : keep your currently-installed version D : show the differences between the versions Z : start a shell to examine the situation The default action is to keep your current version. *** release-upgrades (Y/I/N/O/D/Z) [default=N] ?
When prompted, enter D to view the obsolete packages, then press Y and press Enter to remove the packages.
Remove obsolete packages? 42 packages are going to be removed. Continue [yN] Details [d]
After the upgrade is complete, press Y and then Enter to restart the server.
System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN]
View the distribution version of the upgraded Ubuntu server.
console$ cat /etc/os-release
Your output should be similar to the one below:
PRETTY_NAME="Ubuntu 24.10" NAME="Ubuntu" VERSION_ID="24.10" VERSION="24.10 (Oracular Oriole)" VERSION_CODENAME=oracular ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=oracular LOGO=ubuntu-logo
Upgrade from Ubuntu 24.10 to 25.04
Ubuntu 25.04 introduces updated packages and enhancements over 24.10. As a non-LTS release, it requires a manual upgrade process. Follow the steps below to upgrade your system from Ubuntu 24.10 to 25.04 safely and interactively.
Ensure that the
Prompt
is set tonormal
in the release upgrade configuration file.console$ cat /etc/update-manager/release-upgrades
Your output should be similar to the one below:
[DEFAULT] ...... Prompt=normal
Update your APT server's index to fetch the latest repo updates.
console$ sudo apt update
Ensure that all installed packages are up to date.
console$ sudo apt upgrade -y
Reboot the server to apply the new updates.
console$ sudo reboot
Make sure that the temporary SSH port is open in the UFW firewall.
console$ sudo ufw status
Your output should be similar to the one below:
Status: active To Action From -- ------ ---- 22/tcp ALLOW Anywhere 1022/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 1022/tcp (v6) ALLOW Anywhere (v6)
Begin the upgrade process again from Ubuntu 24.10 to Ubuntu 25.04.
console$ sudo do-release-upgrade -d
In the above command
-d
option is used because Ubuntu 25.04 is currently a development release and not yet offered as a standard upgrade path.Press Y and then Enter to proceed with the upgrade.
Checking for a new Ubuntu release = Welcome to Ubuntu 25.04 'Plucky Puffin' = The Ubuntu team is proud to announce Ubuntu 25.04 'Plucky Puffin'. To see what's new in this release, visit: https://wiki.ubuntu.com/PluckyPuffin/ReleaseNotes ...... Continue [yN]
Ensure that you open the additional SSH port to access the server in case you encounter any issue.
Continue running under SSH? This session appears to be running under ssh. It is not recommended to perform a upgrade over ssh currently because in case of failure it is harder to recover. If you continue, an additional ssh daemon will be started at port '1022'. Do you want to continue? Continue [yN]
This will start a temporary SSH daemon on port
1022
, allowing you to reconnect in case the default SSH session is disrupted during the upgrade.Press Enter to apply the additional firewall rules and proceed
To make recovery in case of failure easier, an additional sshd will be started on port '1022'. If anything goes wrong with the running ssh you can still connect to the additional one. If you run a firewall, you may need to temporarily open this port. As this is potentially dangerous it's not done automatically. You can open the port with e.g.: 'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' To continue please press [ENTER]
Press Y to begin the upgrade process.
Do you want to start the upgrade? 1 package is going to be removed. 46 new packages are going to be installed. 617 packages are going to be upgraded. You have to download a total of 1,302 M. This download will take about 4 minutes with your connection. Installing the upgrade can take several hours. Once the download has finished, the process cannot be canceled. Continue [yN] Details [d]
Press D to view the obsolete packages, and then press Y to proceed with the removal of the obsolete packages.
Remove obsolete packages? 37 packages are going to be removed. Continue [yN] Details [d]
After the upgrade is complete, press Y and then Enter to restart the server.
System upgrade is complete. Restart required To finish the upgrade, a restart is required. If you select 'y' the system will be restarted. Continue [yN]
Test the Upgraded Ubuntu 25.04 Server
After upgrading to Ubuntu 25.04, it’s important to verify that the server is functioning correctly and that all packages were successfully upgraded. Follow the below steps to ensure everything is working as expected.
View the active Ubuntu version on your server.
console$ cat /etc/os-release
Your output should be similar to the one below:
PRETTY_NAME="Ubuntu 25.04" NAME="Ubuntu" VERSION_ID="25.04" VERSION="25.04 (Plucky Puffin)" VERSION_CODENAME=plucky ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" UBUNTU_CODENAME=plucky LOGO=ubuntu-logo
This confirms that the upgrade to Ubuntu 25.04 was successful.
View the latest installed kernel version.
console$ uname -mrs
Your output should be similar to the one below:
Linux 6.14.0-15-generic x86_64
Remove the temporary SSH port rule
1022
that was added earlier.console$ sudo ufw delete allow 1022/tcp
Resolve Post-upgrade Issues
After upgrading, it’s crucial to ensure that all repositories are configured correctly and that no issues remain with the packages on your server. Follow the steps below to verify the system and perform any necessary updates.
View all existing APT repository sources.
console$ ls /etc/apt/sources.list.d
Your output should be similar to the one below:
docker.list ubuntu.sources ubuntu.sources.curtin.orig
If you see any third-party repositories that need to be updated (to point to the new release), edit their respective
.list
files to include the new Ubuntu version sources.Update the server's package information index.
console$ sudo apt update
Upgrade the server packages.
console$ sudo apt upgrade
Remove unused and obsolete packages.
console$ sudo apt autoremove -y && sudo apt autoclean
Conclusion
You have upgraded your Ubuntu 24.04 (LTS) instance to Ubuntu 25.04 (Non-LTS) using the do-release-upgrade -d command. The upgrade process involved reviewing prompts, allowing a reboot, verifying the new OS and kernel versions, and cleaning up obsolete packages. You also updated third-party repositories to align with the new release. As Ubuntu 25.04 is a non-LTS version with only nine months of support, be prepared to perform timely upgrades to maintain system security and compatibility. For more details, refer to the Ubuntu server upgrade documentation.
No comments yet.