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:
wolfman@fred5:~$ 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
wolfman@fred5:~$
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!.
See also: