I would like to know how to upgrade from my current version of Ubuntu to the next stable from the Command line interface?
3 Answers
You'll first need to make sure update-manager-core is present (it may already be installed):
sudo apt-get install update-manager-core
Next, run:
sudo do-release-upgrade
You may need to check /etc/update-manager/release-upgrades
and change the line:
Prompt=lts
to:
Prompt=normal
for the release to show up.
-
I have Ubuntu 17.10 installed. Apparently the
update-manager-core
package has been added to the core packages since the answer was given, as trying to install it yields the outputupdate-manager-core is already the newest version (1:17.10.13).
, and the commanddo-release-upgrade
is available. However, giving this command on the command line produces the outputNo new release found.
, even though release 18.04 was released last week. (I do have the linePrompt=normal
in file/etc/update-manager/release-upgrades
.) Commented Apr 30, 2018 at 12:03 -
@TeemuLeisti the
/etc/update-manager/release-upgrades
documentation saysnormal - Check to see if a new release is available. If more than one new release is found, the release upgrader will attempt to upgrade to the supported release that immediately succeeds the currently-running release.
Commented Oct 19, 2019 at 20:17 -
So it seems that setting
Prompt=normal
is NOT enough to update to the latest version. This will only update you to the second-to-latest version Commented Oct 19, 2019 at 20:18 -
1I found running
/usr/lib/ubuntu-release-upgrader/check-new-release -d
and thendo-release-upgrade -d
works for me Commented Oct 19, 2019 at 20:30
If you run the command sudo do-release-upgrade -d
through SSH then use a GNU Screen, because the upgrade process will turn off SSH -> close the default port and open a new one (it will inform you of this new port), so:
$ ssh USER@HOST
$ screen -S upgrade
$ sudo do-release-upgrade -d
open a new terminal on client computer:
$ ssh -p PORT USER@HOST
$ screen -d
$ screen -r upgrade
-
4sudo do-release-upgrade -d is for devel release If you want to do LTS to the next one just use: sudo do-release-upgrade without the "-d" switch Commented Feb 17, 2014 at 4:27
-
2As of Ubuntu 14.04 (and possibly ealier),
do-release-upgrade
now automatically creates ascreen
for you to make it easier to recover a failed upgrade. It also starts a secondary ssh server for the same reason. So this advice is no longer necessary. Commented Aug 23, 2019 at 20:45 -
I have been trying for months to upgrade from Mate 16.04 to 18.04 but have been completely blocked by Blue Ray software & hardware upgrade errors. The Java component wouldn't install, so I did so from terminal. Now a base portion of the program which the others are dependencies of. It won't upgrade stating a major error. Attempting to remove it also removes the Mate desktop and all of it's dependencies. What must I do? Remove it & Mate then update to 18.04 & reinstall Mate from only terminal? Commented Nov 4, 2019 at 15:31
You can do
sudo do-release-upgrade
for command line updating
(This is actually the same as for Ubuntu Server)
/usr/lib/ubuntu-release-upgrader/check-new-release -d
and thendo-release-upgrade -d
works for mesudo apt-get update
+sudo apt-get upgrade -y
+sudo apt-get dist-upgrade
and finallysudo do-release-upgrade
.