How to upgrade Ubuntu (Mate) via the terminal

Hi all,

this is for anyone who wants to use the terminal to fully update their current installed OS to the next available version, you just need to follow the next few steps and you can update directly without using the on-board update tool (Software Updater).

First, make sure that your current software sources are set to your liking, making sure that the "Canonical" repositories are also active if you wish to also update any non-free software you might have installed such as Skype.

Make sure that you have updates marked and where it states "Notify me of a new Ubuntu version"; is set to "For any new version":

Unless you want to update from an LTS version to the next higher one; then select: "For longterm support versions"!.

Second, run this command for that just-in-case scenario even if it is already installed. (Just to be on the safe side otherwise the full OS update may well fail!):

sudo apt-get install update-manager-core

Once that is done, run the next command to fully update your current software sources list:

sudo apt-get update

Then run the following command to update your current OS to the next highest version:

sudo do-release-upgrade

If you are unsure as to what version of Ubuntu you currently have installed, run the following command:

lsb_release -a

and you will get a readout like the following:

[email protected]:~$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch:core-4.1-ia32:core-4.1-noarch:security-4.0-ia32:security-4.0-noarch:security-4.1-ia32:security-4.1-noarch
Distributor ID: Ubuntu
Description: Ubuntu Vivid Vervet (development branch)
Release: 15.04
Codename: vivid
[email protected]:~$

When you update one version of Ubuntu to the next highest level, any 3rd party PPA's will be deactivated and you will need to check your software sources again after the update is finished to see what you need to reactivate, some 3rd party PPA's may not be available for your new Ubuntu version and you may have to search for an alternative PPA or wait until a newer one is made available!.

Some applications are also no longer supported or are not on offer so you may well have to take note of what doesn't get upgraded and replace it with a different suitable application, you will be informed about this so check your apps list after upgrading!. You can easily check your list of installed apps by opening Ubuntu Software Center > Installed:

Also worth noting, during the update process, you may well be asked to replace files with (for example) the "Package maintainers version" and also to remove obsolete or unwanted packages, in both cases you should say "Yes". I have never had a problem when doing this.

Please bear in mind that as far as I know; you can only update Ubuntu to the next highest version, it will not skip a version or two!, you cannot for example; update U14.04 to U15.04 without first updating to U14.10. (If anyone knows different, please let me know and I will change that!)

As an alternative to save a bit of time if you do need to update two versions, you can use the "Something else" method but you will still have to install all your apps again but your data will remain intact!. (type-up a meta sudo apt-get install command for all your favourite apps which you can copy and paste into the terminal once your new install is complete, that's what I do!).

And last but not least, for the risk takers among you, you can update your version of Ubuntu to the development version but use this command at your own risk as the dev versions can completely ruin your installed OS and may lead to data loss, BACKUP ALL YOUR DATA BEFORE USING THE FOLLOWING COMMAND!:

sudo do-release-upgrade -d

Remember that dev versions may be unstable and are not recommended for Linux beginners!.

The only way to skip versions that I know of is when you are running an LTS (Long Term Support) version!. For example, Ubuntu 12.04 LTS to Ubuntu 14.04 LTS, this depends on your software sources settings where it states "Notify me of a new Ubuntu version"; and it is set to "For long-term supported versions".

And really last but not least, the following terminal command WILL NOT UPGRADE YOUR SYSTEM TO THE NEXT AVAILABLE VERSION!:

sudo apt-get update && sudo apt-get dist-upgrade

Hope it helps!. :smiley:

See also:

Ubuntu mate 16.04 download link is down!
Missing desktop icons
Sound applet missing after pulseaudio reinstall (solved)
(Solved) Unable To Change Cursor Theme
Encrypted DVDs Do Not Autoplay
Nvidia - two monitors, separate X screens
How to update from 15.10 to 15.10.1/16.04
Newbie Upgrade Question
Does upgrading to new version require reinstall?
Upgrade from 15.10 to 16.04 Beta
Error while upgrading from 15.10 to 16.04 Beta 2
Error while upgrading from 15.10 to 16.04 Beta 2
Update problem - Some index files failed to download
Mate Update Problem
Shockwave Flash vulnerable or not?
[Solved] Mate 16.04 VLC acceleration not available
[Solved] Mate 16.04 VLC acceleration not available
Could you share your PPA list?
Why doesn't /etc/os-release updates itself (16.04 -> 16.10)
Upgrade 16.04 LTS to 16.10
Upgrade from 14.04 to 16.04
New install mate 16.0 - 'Welcome' and 'software boutique not working
How to upgrade to newer Version: 16.04.1->16.04.2 / 16.10 -> 17.04
Availability of Mate 18.04LTS in Australia
Upgrading with a fresh install
Problems with graphic card drivers
Can I upgrade a Ubuntu 17.10 debian desktop to 18.04 mate beta?
Progress report as we approach 18.04 Beta 2
Installing Mate over Ubuntu 17.10 caused dependency problem
Trouble upgrading from 16.04 to 18.04
Nouveau Driver and Frequent Crashes
Upgrade button does nothing
Boot up mate 18.04
Inserting USB Freezes Computer
Ubuntu MATE 16.04 LTS
Will the Ubuntu release-upgrade command kill Ubuntu Mate
(Solved) Upgrading From 14.04 LTS to 15.04?
[HELP]Upgrading to 15.04 broke my system pretty much

Excellent @wolfman. Thank you! :grinning:


Hey wolfman, what’s the difference between this and updating via the mate software updater?

Hi @kreasonos,

nothing really, all roads lead to Rome, it is just that some people prefer to use the terminal over the on-board tools that Ubuntu (Mate) provides!.

Maybe one of the others have a better and more precise answer but that is it in a nutshell!. :smiley:


Thanks Wolfman - very comprehensive and well researched.

1 Like

i had trouble in the first step because it was unable to fetch some archive. what should i do?

Hi Niel,

you need to be more specific, post the command you are having problems with please!. :smiley: