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?

Introduction: 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.

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

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

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:

How to verify updated Ubuntu Linux 18.04 system

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.

🐧 If you liked this page, please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on SysAdmin, Linux/Unix, Open Source/DevOps topics:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
0 comments… add one

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre>, <code>...</code> and <kbd>...</kbd> for code samples.