How to upgrade Ubuntu to the latest version via terminal

If you are running the server version of Ubuntu or choose to not use the GUI, then you can use this tutorial to upgrade your system to the latest version (or the latest LTS version).

ubuntu-upgrade

Although many systems can be upgraded in place without incident, it is often safer and more predictable to migrate to a major new release by installing the distribution from scratch, configuring services with careful testing along the way, and migrating application or user data as a separate step.

Steps

  1. Please backup your important datas.
  2. Now update your software package list.
    sudo apt-get update -y
    
  3. Now upgrade your packages to available latest version.
    sudo apt-get upgrade -y
    
  4. Now use the dist-upgrade command, which will perform upgrades involving changing dependencies, adding or removing new packages as necessary. This will handle a set of upgrades which may have been held back by apt-get upgrade.

    sudo apt-get dist-upgrade
    
  5. Now check whether the update-manager-core package is installed or not.
    sudo apt-get install update-manager-core -y
    
  6. If you want to upgrade to the latest LTS version or the latest version, you have to do some editing in the file /etc/update-manager/release-upgrades.
    sudo nano /etc/update-manager/release-upgrades
    

    If you want the LTS version, then change Prompt=lts or if wish to the latest normal version, then change Prompt=normal. After editing, press ctrl+x and then y to save & exit the file.

  7. Upgrade the system to the latest version of Ubuntu.
    sudo do-release-upgrade
    

    This includes a lot of download of packages from the Internet. Give some patience according to your Internet speed.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s