Ubuntu – Attempting to upgrade from Ubuntu Server 16.04 to 18.*

aptupdatesupgrade

I have read through multiple articles giving instruction on how to go from 16.04 to 18.*. None of which appear to be working for me.

When I get to

do-release-upgrade

I get the message

Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.

Currently I have /etc/update-manager/release-upgrades set to normal Setting this to LTS yields the same results.

Additionally this is after running both:

sudo apt update && sudo apt upgrade

Of course if I run

do-release-upgrade -d

I get the message

Upgrades to the development release are only
available from the latest supported release.

This makes sense to me. What am I missing here? Can I go from Ubuntu Server 16.04 to 18.*?

UPDATE

I noticed now when I run

sudo apt update

I get this output

sudo apt-get update
Hit:1 http://us.archive.ubuntu.com/ubuntu xenial InRelease
Hit:2 http://download.mono-project.com/repo/debian jessie InRelease
Hit:3 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://ppa.launchpad.net/ermshiperete/monodevelop/ubuntu xenial InRelease
Hit:5 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease
Hit:8 http://ppa.launchpad.net/iconnor/zoneminder/ubuntu xenial InRelease
Hit:9 http://ppa.launchpad.net/jcfp/ppa/ubuntu xenial InRelease
Hit:10 http://ppa.launchpad.net/modriscoll/nzbget/ubuntu xenial InRelease
Get:7 http://download.sonarr.tv/repos/apt/debian master InRelease [13.3 kB]
Err:11 http://shell.ninthgate.se/packages/debian jessie InRelease
  Could not connect to shell.ninthgate.se:80 (195.22.88.165). - connect (111: Connection refused)
Fetched 13.3 kB in 5s (2,532 B/s)
Reading package lists... Done
W: Failed to fetch     http://shell.ninthgate.se/packages/debian/dists/jessie/InRelease  Could not     connect to shell.ninthgate.se:80 (195.22.88.165). - connect (111:     Connection refused)
W: Some index files failed to download. They have been ignored, or old ones used instead.

Running

sudo apt list --upgradable

Yields

Listing... Done
libgdiplus/stable-jessie 5.6-0xamarin5+debian8b1 amd64 [upgradable from: 4.2-1ubuntu1]
N: There are 2 additional versions. Please use the '-a' switch to see them.

I believe this may be whats keeping me from upgrading to 18.*. I am a little stuck at this point.

UPDATE

Was able to get this resolved with the answer that I accepted.

I also had to clean up some repos that were dead. I ran into an issue where I could not connect to security.ubuntu.com as well. To resolve this I did the following:

sudo vi /etc/gai.conf

Uncomment the following line

#
# For sites which prefer IPv4 connections change the last line to
#
precedence ::ffff:0:0/96 100

I was able to finish updating. Now upgrading my distro of Ubuntu

Welcome to Ubuntu 18.04.1 LTS (GNU/Linux 4.15.0-43-generic x86_64)

Best Answer

I had the same issue. I did:

sudo apt-get update 
sudo apt-get upgrade -y
sudo apt-get dist-upgrade
sudo do-release-upgrade

Hope this helps!