Upgrading Ubuntu from 18.04 (Bionic Beaver) directly to 25.04 (Lunar Lobster) is not supported in a single step. Ubuntu only supports upgrades from one LTS (Long Term Support) release to the next LTS, or from one regular release to the next. Skipping multiple versions is not recommended and can break your system.
Ubuntu 25.04 is a future release (as of June 2025), so make sure it is officially released and supported before upgrading.
Recommended Upgrade Path
You must upgrade sequentially through each LTS or regular release. Here’s the safest path:
- 18.04 LTS → 20.04 LTS
- 20.04 LTS → 22.04 LTS
- 22.04 LTS → 24.04 LTS
- 24.04 LTS → 25.04 (if 25.04 is a regular release, you may need to enable normal releases)
Step-by-Step Upgrade Instructions
1. Backup Your Data
Before starting, backup all important data. Upgrades can fail and cause data loss.
2. Update Your Current System
sudo apt update
sudo apt upgrade
sudo apt dist-upgrade
sudo apt autoremove
3. Upgrade to 20.04 LTS
sudo do-release-upgrade
4. Repeat for Each Release
After each upgrade, reboot and repeat the process for the next LTS:
- 20.04 → 22.04
- 22.04 → 24.04
- 24.04 → 25.04 (if available)
5. For Non-LTS (Interim) Releases
If you want to upgrade to a non-LTS release (like 25.04), you may need to edit /etc/update-manager/release-upgrades and set:
Prompt=normal
Then run:
sudo do-release-upgrade
Alternative: Fresh Install
Given the number of upgrades, a fresh install of Ubuntu 25.04 is often safer and faster. You can then restore your data from backup.
Summary Table
| From | To | Command |
|---|
| 18.04 LTS | 20.04 LTS | sudo do-release-upgrade |
| 20.04 LTS | 22.04 LTS | sudo do-release-upgrade |
| 22.04 LTS | 24.04 LTS | sudo do-release-upgrade |
| 24.04 LTS | 25.04 | sudo do-release-upgrade |
Note:
- Each upgrade can take a long time and may require manual intervention.
- Always read the release notes for each version.
- Consider a fresh install for best results.
If you need detailed commands for each step or run into errors, let me know!