0

How can I Upgrade Ubuntu 16.04 LTS to Ubuntu 20.04.2.0 LTS via Terminal?

Thanks!

070221090
  • 101
  • 1
  • 1
  • 4

2 Answers2

3

The do-release-upgrade command is aimed to upgrade your operating system. See man do-release-upgrade. In your case, the command will upgrade from 16.04 to 18.04. After rebooting into the updated 18.04, you will need to run the command again to upgrade to 20.04. Make sure your system is fully updated before you upgrade.

This process will be rather lengthy, and there is a fair chance that there will be little issues here and there after the upgrade, if not worse. It will be quicker to do a fresh install at this stage.

vanadium
  • 88,010
0

I would recommend running the upgrade on a clone of your production system. Then if the clone passes all tests error free, convert the clone to your production system. See:

Note you need to create a partition the size of your production system in order to use the script. Also note as other answer mentions you have to run 16.04 to 18.04 upgrade first and then 18.04 upgrade second.

You may find out the best method is:

  • Clone production system to 16.04 clone.
  • Run 16.04 to 18.04 upgrade on 16.04 clone.
  • Find errors, fix errors in production system.
  • Rerun 16.04 to 18.04 upgrade on 16.04 clone.
  • Clone 16.04 clone to new 18.04 clone.
  • Run 18.04 to 20.04 upgrade on 18.04 clone.
  • Find errors, fix errors in 18.04 clone.
  • Rerun 18.04 to 20.04 upgrade on 18.04 clone.
  • After running clone clone for a few days, Rename clone clone to production system.

Or of course you can simply back up your production system, attempt upgrades and simply restore after each failed attempt at upgrade. Fix what cause the failure, backup again and attempt upgrade again. Wash, rinse, repeat.