Forced Do-Release-Upgrade Ubuntu 18.04: A Step-by-Step Guide
Are you trying to update an already End-of-Life (EOL) Ubuntu version, such as 18.04, using the do-release-upgrade command? This article will guide you through the process, highlighting key concepts and providing detailed instructions.
Why can't I upgrade an EOL Ubuntu version using do-release-upgrade?
The do-release-upgrade command is designed to upgrade Ubuntu to the next supported release. Once an Ubuntu version reaches its EOL, it no longer receives official support or updates, including new kernels and security patches. As a result, the do-release-upgrade command will not work for EOL versions.
How can I force a do-release-upgrade on an EOL Ubuntu version?
While generally not recommended, you can still force the upgrade by modifying some system files and using the command-line. Be aware that this process carries risks, including potential system instability, and should only be performed by experienced users. This guide covers upgrading from Ubuntu 18.04 to 20.04. You can't directly upgrade from 18.04 to a later release, so you'll need to upgrade to 20.04 as an intermediate step.
Step 1: Modify the /etc/update-manager/release-upgrades file
First, open the /etc/update-manager/release-upgrades file:
sudo nano /etc/update-manager/release-upgrades
Then, change the Prompt value from "lts" to "normal":
Prompt=normal
Step 2: Edit the /etc/apt/sources.list file
Open the /etc/apt/sources.list file:
sudo nano /etc/apt/sources.list
Replace all instances of "bionic" (the codename for Ubuntu 18.04) with "focal" (the codename for Ubuntu 20.04):
deb http://us.archive.ubuntu.com/ubuntu/ focal main restricted
...
Step 3: Update the package lists and install the required packages
Now, update the package lists and install the required packages:
sudo apt update
sudo apt install update-manager-core
Step 4: Perform the upgrade
Finally, execute the following command to start the upgrade process:
sudo do-release-upgrade
The system will inform you of the upgrade, and you can proceed by pressing Enter. Follow the on-screen instructions to complete the upgrade.
- The
do-release-upgradecommand is typically used for upgrading to supported Ubuntu releases. - EOL Ubuntu releases cannot be upgraded directly using the
do-release-upgradecommand. - Forcing an upgrade on an EOL Ubuntu version involves changing system files and carrying potential risks.
References
- Ubuntu Release End of Life (EOL) announcement
- Modifying the /etc/update-manager/release-upgrades file for EOL
- Upgrading from 18.04 to 20.04 (intermediate step) instructions