Update Ubuntu from the Terminal

Update Ubuntu from the Terminal

In Ubuntu or any other open source operating system, the updates come pretty frequently. Instead of going all the way to the Update Center to install them each you can keep the auto update feature on. But what if you need the connection to something you want to rather than download all the stuff one by one? If you want more control and update Ubuntu manually you will want to download the updates at one go some time of your own choosing. Follow these instructions to do these in a snap.

Update Ubuntu from the terminal for more fun!
Update Ubuntu from the terminal for more fun!

What you will need to Update Ubuntu from the Terminal

  • A reasonably good computer – Any PC capable of running Ubuntu or any other derivative is fine.
  • A fast internet connection – Otherwise to update Ubuntu could take forever.
  • The latest release of Ubuntu is recommended. Any other supported Ubuntu release is also fine. Check if the version installed on your system is still available for download on the ubuntu website or not. If it is present, you are good. Otherwise you need to download the latest release – upgrade and then read from the beginning. This should get you started when you update Ubuntu.
  • A willingness to delve into the forbidden joys of the terminal.
  • Patience – You may need a lot of this.

When you boot into your desktop fire up terminal with Ctrl + Alt + T. In it type –

sudo apt-get update

It will ask for the administrator password. Provide the same to continue.
This will update the repository information – the name, location and version of packages that are installed or can be installed on your system. You can increase your repository by adding new ones, but that’s another story. By default your system will have the Ubuntu repositories and some for restricted drivers. When you enter this command a lot of fetch lines will be shown on screen. Don’t be scared and wait for some time. Depending on your internet speed, it will run for a few seconds(or minutes) and throw the control back to you.

Type in the following –

sudo apt-get upgrade

This will take some time. You can do nothing about it. Wait till the packages that are installed on your system are all first downloaded and installed automatically. You can keep an eye on the terminal for the details. You can also write the entire output to a text file to check back later on like this. Instead of the command above you can give something like this instead.

sudo apt-get upgrade > output.txt

This way you can keep a log of all that just occurred. After it is complete and you are returned to bash, the upgrade can be considered complete. Instead of a ‘do when you like’ auto update feature, this method feels much better for me. If it suits you you can do so too. Of course one downside is that all the software currently installed on your system will be upgraded. This is the simplest method to update Ubuntu in my opinion. Happy upgrading.