1

I have Ubuntu Server and Desktop 18.04 and 20.04, 4 releases (it through VirtualBox)

I want to know the correct and best approach to accomplish through only commands the two following scenarios:

  1. upgrade from 18.04 to 18.10 (or higher of the same release - i.e. 18.15 - if exists of course)
  2. upgrade from 18.04 to 20.04 (or higher of the latest release - i.e. 20.10 - if exists or course)

Therefore I am able to choice any of them.

I did do research and I found these commands

  • sudo do-release-upgrade -d
  • sudo apt full-upgrade
  • sudo apt dist-upgrade

Sadly there is no one page covering the three commands together to understand how each one works and when is mandatory use one over the others. So I created this post to avoid do a wrong choice.

1 Answers1

5

Run sudo apt full-upgrade first to make sure all your software is fully up-to-date, then run sudo do-release-upgrade and you should be good to go!

Be sure that you backup anything of importance on your system(s), just to be on the safe side, and also note that any third-party repositories you may have will be disabled for the upgrade process, and will need to be re-enabled afterwards to the proper repo version (i.e. changing the bionic in the repo string to focal.)


You can also run do-release-upgrade -c to just check if there is an upgradable release available (which for an 18.04 system, there will be.)