Is there, anywhere on the internet, a reliable step-by-step guide on how to upgrade from Ubuntu 16.04 to 20.04? Apparently it has to be done via 18.04. I have updated the current 16.04 system by:

  • sudo ufw allow 1022/tcp

  • sudo apt update && sudo apt upgrade

After this i get the message:
The following packages have been kept back:
cloud-init

I guess that is why the system upgrade fails:

  • sudo do-release-upgrade

gives the message:
Please install all available updates for your release before upgrading.

Thanks for any help!
David

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.

×
2 answers

Edit: I don’t find any useful information that explains if upgrading via 18.04 means:

  • the upgrade process will do this by itself in two steps
  • I need to specify 18.04 in the command since otherwise it will try to go straight to 20.04
  • I need to do the upgrade twice; first the upgrade command will upgrade to 18.04. Then I will have to run the upgrade again and it will install 20.04

//David

Hi,

@DavidKo wrote
I don’t find any useful information that explains if upgrading via 18.04 means...

You need to do an upgrade in two steps

  • from 16.04 to 18.04
  • from 18.04 to 20.04

Each time you do that with a command

sudo do-release-upgrade
@DavidKo wrote
After this i get the message: The following packages have been kept back: cloud-init I guess that is why the system upgrade fails

That is probably the cause of the failure. You could try to do some steps to fix it but before doing anything I recommend making a snapshot of the droplet.
You could try to (re)install the package that has been kept back.

sudo apt install cloud-init

You may get the questions about replacing packages with the new ones during the installation. Agree to that.

Let me know if it works, pls.

Submit an Answer