Ubuntu upgrade from 17.04 to 18.04
I’ve installed ubuntu 17.04 and I want to upgrade it to 18.04. When I tried to do:
sudo do-release-upgrade
I got a message saying
An upgrade from 'zesty' to 'bionic' is not supported with this tool
. Need inputs to proceed on this.sudo do-release-upgrade Checking for a new Ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife Get:1 Upgrade tool signature [819 B] Get:2 Upgrade tool [1,257 kB] Fetched 1,258 kB in 0s (0 B/s) authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' extracting 'bionic.tar.gz' Reading cache Checking package manager Can not upgrade An upgrade from 'zesty' to 'bionic' is not supported with this tool.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
This was not properly explained anywhere, here is what you need to do (or how I did it):
Upgrade to 17.04 to 17.10:
Unable to upgrade from ubuntu 17.04 to 17.10
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak #to be safe sudo sed -i -re 's/old-releases.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list sudo sed -i -re 's/zesty/artful/g' /etc/apt/sources.list sudo apt update sudo apt dist-upgrade sudo apt autoremove
(Links says to use aptitude instead of apt-get)
Upgrade from 17.10 to 18.04: EOLUpgrades
Replace everything in /etc/apt/sources.list with this:
## EOL upgrade sources.list # Required deb http://old-releases.ubuntu.com/ubuntu/ artful main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ artful-updates main restricted universe multiverse deb http://old-releases.ubuntu.com/ubuntu/ artful-security main restricted universe multiverse # Optional #deb http://old-releases.ubuntu.com/ubuntu/ artful-backports main restricted universe multiverse
Then run the upgrade:
apt-get update apt-get dist-upgrade do-release-upgrade
Do what it says when asked and wait for it to finish and you should be done.
EDIT
According to WiMantis, sudo sed -i -re 's/old-releases.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list
is no longer needed. WiMantis made a post about it. Relevent part:
# Upgrade from 17.04 to 17.10 # backup current sources file (just in case) sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak # change version codename from 'zesty' to 'artful' sudo sed -i -re 's/zesty/artful/g' /etc/apt/sources.list # 17.10 has reached it's end of life # so we fetch from 'old-releases.ubuntu.com' sudo sed -i -re 's/archive.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list sudo apt update sudo apt dist-upgrade sudo apt autoremove
# Upgrade from 17.10 to 18.04 LTS # change version codename from 'artful' to 'bionic' sudo sed -i -re 's/artful/bionic/g' /etc/apt/sources.list # 18.04 has NOT reached it's end of life yet (due in 2028) # so we fetch from 'archive.ubuntu.com' sudo sed -i -re 's/old-releases.ubuntu.com/archive.ubuntu.com/g' /etc/apt/sources.list sudo apt update sudo apt dist-upgrade sudo apt autoremove
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0