How to upgrade Ubuntu16.04 to 18.04

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


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.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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

Then cleaned the update state:

apt clean
apt autoclean

and restarted the update process: