sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade
mkdir wily && cd wily
wget http://old-releases.ubuntu.com/ubuntu/dists/wily-updates/main/dist-upgrader-all/current/wily.tar.gz
tar -xzf wily.tar.gz
sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' Ubuntu.info
sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com|security.ubuntu.com/old-releases.ubuntu.com/g' Ubuntu.mirrors
sudo ./wily
Upon running this on another host I got "ImportError: No module named 'apt' just install it:
Either:
apt-get install python-apt -y
sudo apt-get install python3-apt --reinstall
<- This worked for me.
Gets a bunch of 404's and then asks if it should overwrite the sources.list
Y
Try not to kill ssh if you're connected via ssh... Wait patiently and hope everything works...
restart
Should be on 15.10
cd ~
mkdir
cp ~/sources.list ~/sources-backup.list
cp /etc/apt/sources.list ~/sources.list
sudo apt-get update && sudo apt-get upgrade
sudo do-release-upgrade
go through the upgrade, hope everything works...
Things are going to be removed, I just removed them all, I'll add back whatever I need later
restart the server again
should be on 16.04.3
sudo apt-get autoremove
I was getting the same issue when connected via SSH. You can either install x11vnc, start vnc via ssh, then remote in that way; or install xrdp, then remote in from windows remote desktop, or remmina from another linux machine. Hopefully that helps.
Upgrade from 15.04 to 15.10 worked as expected, going from 15.10 to 16.04 was good too.
This worked perfectly for me! Saved me a couple hours of driving, re-installing, and re-setting up software. Good stuff!
Lesson learned, always use the LTS releases for servers, don't leave your stuff unpatched for too long.