Question

How to upgrade Ubuntu16.04 to 18.04

Posted August 22, 2021 115 views
Linux BasicsUbuntuUbuntu 18.04

As I was trying to upgrade my Ubuntu from 16.04 to 18, by the command:

do-release-upgrade

It kept giving me this message:
Please install all available updates for your release before upgrading.

I have done all the updates command mentioned in the Community.

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

and rebooted also.

Thanks.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
1 answer

Hi @derekzhangv,

When running the following:

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

Do you see any failed packages on the update?

Additionally, I’ve had a case where a third-party repository with a broken-dependency, which showed up via sudo apt list –upgradable - the package in question did require another package, which was unavailable due to an error of the packager.

I solved it by disabling all third party repositories (as root):

cd /etc/apt/sources.list.d/
for i in *.list; do
  mv $i ${i}.disabled
done

Then cleaned the update state:

apt clean
apt autoclean

and restarted the update process:

do-release-upgrade