Upgrade Ubuntu from CLI

Nuwan Tissera
2 min readMay 29, 2020

--

The easiest thing is updating from settings in Ubuntu. But most of the time that get errors while upgrading and the process is not transparent.

So let's try to do from CLI, The way it worked for me.

First of all, We need to have a backup of the system.

1. BackUp

Systemback

You may use this tool to back up the system.

2. Update & Upgrade APT

sudo apt update 
sudo apt upgrade

3. Upgrade Current System

sudo apt dist-upgrade

4. Clean

sudo apt autoremove

5. Action

sudo do-release-upgrade

6. Reboot

sudo reboot

7. Check New Version

lsb_release -a

Tested upgrades

Ubuntu 18.04 to 18.10

Ubuntu 18.10 to 19.04

Ubuntu 19.04 to 19.10

19.10 to 20.04 Focal Fossa

  • Open the “Software & Updates” Setting in System Settings.
  • Select the 3rd Tab called “Updates”.
  • Set the “Notify me of a new Ubuntu version” drop-down menu to “For any new version” if you are using 19.10; set it to “For long-term support versions” if you are using 18.04 LTS.

Press Alt+F2 and type update-manager -c into the command box if you are using 19.10; type update-manager -c -d if you are using 18.04 LTS.

  • Update Manager should open up and tell you that Ubuntu 20.04 LTS is now available.

Enjoy !!

--

--