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
do-release-upgrade
command.http://www.ubuntu.com/releaseendoflife
" Did you do that? What did you do with the information there?