How To Update All Packages On Ubuntu

How To Update All Packages On Ubuntu
If you are new to Ubuntu, you might be having a difficult time adjusting to the Gnome environment.  If you are confused about what a package is, compare it to a real-life example. In real life, a package can be a box containing different items. You can access the items in the box by unpacking the said package. Similarly, a package in Ubuntu is a compressed file archive containing a list of files and scripts required to run a particular application. For Ubuntu to access those files, it needs to unpack or in computer terminology install/update the said package.

Updating packages in Ubuntu is, to be honest, quite a simple task that can be done with just two mouse clicks, or by typing two commands if you are updating via terminal. There are two major ways that you can go about completing this task. You can update your packages via command line, or if you like to perform tasks using GUI, you can update your packages graphically using Package Updater. The choice is yours to make.

Method 1:Via Terminal

On the Ubuntu desktop, go to the terminal by clicking the terminal icon in the shell or simple press Ctrl+Alt+T.

In the terminal type, the following command

$ sudo apt update

After typing the above command, you will be asked for your password. Type the password in the terminal. No characters will be shown on the terminal when you are writing your password. After typing the password, hit enter.

Now contrary to popular belief, this command doesn't update your system. Instead, it updates your Ubuntu repositories.  So your system checks against the repositories. It checks if there are newer versions available of the program installed. It won't update your existing packages right away; instead, it will update the information about the existing packages and their versions available. This is the reason that when this command finishes execution, Ubuntu shows you the number of packages that can be updated.

In the picture above, you can see that when this command finishes execution, Ubuntu shows you the list of packages that can be updated. In order to view these packages type the following command

$ apt list --upgradable

You can update a particular package, or you can update all of the updatable packages on your Ubuntu. To update all your packages, just type the following command in the terminal.

$ sudo apt upgrade

After typing the above command again, Ubuntu will ask you for your password. Like before, type in the password and hit enter.

After 2 or 3 seconds Ubuntu will show you the amount needed to update these packages and will further ask for your confirmation. To continue, type y in the terminal and press enter. Once you do this, Ubuntu will start downloading and updating your packages.

This command will download and update all of the packages that need updating. A little pro tip here to make this updating task easy. You can also type the following command instead of typing in these two commands.

$ sudo apt update && sudo apt upgrade -y

As the two commands require to run in succession, we can combine them into a single command. The && between the two commands combines them. So now the first command before the && sign runs. When the first command has completed execution, the rest of the command after the && is executed. The -y at the end will save you one keystroke where Ubuntu asks you whether you want to install the upgrades or not.  You should run this command from time to time to keep your system up to date.

Method 2: Update using Package Updater:

Go to the menu and in the search bar type “Software Updater.”. Now run it.

It will check if there are any packages on your system that can be updated.

If there are any such packages, it will give you the option to install the updates

Click on Install Now. It will ask for your password. Type your password and hit Authenticate.

After authenticating, Ubuntu will start downloading and installing the updates.

In some cases, you might be asked to restart your system after the updates. This is so that the installed, updated packages can take full effect and function properly.

In most of the cases after updating, there are some packages the are of no further use to the user. You can delete them, which will free up your system space and keep your system clean and tidy, which is always a good thing. To do so type the following command in the terminal

$ sudo apt autoremove

This tutorial is valid for all the versions of Ubuntu and other Linux distros based on Ubuntu like Linux Lite, Linux Mint, etc.


I hope this tutorial will be helpful to you. One of the many things you hear about Ubuntu is that it's a lot safer than Windows. The proof can be seen when updating. Whenever you make any changes to the system, Ubuntu asks you your password for authentication. Updating packages in Ubuntu is quite simple. Bear in mind that this tutorial is for updating packages in Ubuntu. It doesn't update your Ubuntu version. Also note that this tutorial, including the command line method, is valid for all the versions of Ubuntu and other Linux distros based on Ubuntu like Linux Lite, Linux Mint, etc.

Kuinka Xdotoolia käytetään stimuloimaan hiiren napsautuksia ja näppäilyjä Linuxissa
Xdotool on ilmainen ja avoimen lähdekoodin komentorivityökalu hiiren napsautusten ja näppäimistön simulointiin. Tässä artikkelissa käsitellään lyhyttä...
Viisi parasta ergonomista tietokonehiirtä Linux-tuotteille
Aiheuttaako pitkäaikainen tietokoneen käyttö kipua ranteessasi tai sormissasi?? Onko sinulla nivelten jäykkyys ja sinun on jatkuvasti ravistettava kät...
How to Change Mouse and Touchpad Settings Using Xinput in Linux
Most Linux distributions ship with “libinput” library by default to handle input events on a system. It can process input events on both Wayland and X...