Ubuntu -bash: do-release-upgrade: command not found

ADVERTISEMENTS



Ubuntu -bash: do-release-upgrade: command not found

I am using Ubuntu Linux 16.04 LTS cloud server. I followed this page to upgrade Ubuntu 16.04 to 18.04 but, I am getting an error that read as ‘ -bash: do-release-upgrade: command not found.’ Why am I not getting the Ubuntu 18.04 upgrade using do-release-upgrade and how do I fix this problem?Command not found error indicates that the do-release-upgrade tool not installed on your system or cloud server. It happens when you or your cloud hosting provider uses a minimal Ubuntu Linux 16.04 LTS image to build your cloud server.

Here is a sample session:

$ uname -mrs

$ lsb_release -a

$ sudo do-release-upgrade -d



How to fix do-release-upgrade: command not found error

You need to install package named ubuntu-release-upgrader-core that manages release upgrades. It is the core of the Ubuntu Release Upgrader. To install it, type the following apt command or apt-get command:

$ sudo apt install ubuntu-release-upgrader-core



How to upgrade Ubuntu 16.04 to 18.04

First update your current system by running the following command:

$ sudo apt update

$ sudo apt upgrade

Reboot the Linux system if a new Linux kernel was installed using the reboot command or shutdown command:

$ sudo reboot

Warning: Make sure you keep backups before you start upgrade procedure.

The do-release-upgrade command used to upgrade the operating system to the latest release from the command-line. This is the preferred command if the machine has no graphic environment or if the machine is to be upgraded over a remote connection such as ssh command. Now start the upgrade procedure:

$ sudo do-release-upgrade -d



How to verify updated Ubuntu Linux 18.04 system

Follow on-screen instructions. To finish the upgrade, a restart is required. At the end, you should be promoted to reboot the box as follow:

Find out the Linux kernel version, type:

$ uname -a

$ uname -mrs

Next find out Ubuntu Linux distro version, run:

$ lsb_release -a



Conclusion

You learned how to install do-release-upgrade tool and upgrade the operating system to the latest release. And there you have it Ubuntu Linux 16.04 LTS updated to Ubuntu 18.04 LTS successfully. See this page for more info.