How to keep Ubuntu 22.04 up to date

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to keep your Ubuntu 22.04 machine up to date.

To keep your system secure, while also enjoying the latest features in your apps, you must check for updates often and upgrade your packages when new versions are available.

Updating packages in Ubuntu 22.04 can be done via different ways. However, in this tutorial, we'll be updating and upgrading packages in Ubuntu 22.04 via the terminal.

Keep Ubuntu 22.04 up to date

Step 1 - Check for updates

First you need to launch the terminal by pressing CTRL + ALT +T.

Once terminal is launched, you need to check for updates to see if there are packages that needs upgrade in your Ubuntu 22.04 system.

To check for updates in your Ubuntu 22.04, is quite easy, and it can be done easily via the update command.

sudo apt update

Once the update process is completed, it will tell you how many packages can be upgraded.

As you can see in the screenshot below, the output "46 packages can be upgraded", means we have 46 packages that needs to be upgraded.

Step 2 - Upgrade packages

Next, proceed to upgrade outdated packages.

If you want to see list of the packages that will be upgraded first, you can do so by using the command below.

apt --upgradable list

After inspecting the packages that needs to be upgraded, proceed to upgrade them.

To upgrade these packages, you can do so by using the upgrade command via apt package manager.

sudo apt upgrade -y

And the upgrading process will start automatically, so you don't need to do anything else at this point, as all packages will get upgraded one by one.

As you can see in the screenshot below, all the marked packages will be upgraded.

Once the upgrade process is completed, you will see a similar output in your terminal.

Step 3 - Reboot

Now that your Ubuntu 22.04 is up to date, you need to reboot your machine so that you can use the new upgraded packages.

To reboot Ubuntu 22.04, simply run the following.

reboot

Step 4 - Verify

Once your machine is booted, now you can proceed to verify that the update and upgrade process went fine.

To do so, you need to check for updates again, and see if there's any package left that wasn't updated.

sudo apt update

If everything was updated, you should get the output "All packages are up to date".

That's it! By now your Ubuntu 22.04 system should be up to date.

Conclusion

In this tutorial, you learned how to keep Ubuntu 22.04 up to date, by manually checking for updates, and installing the new updates. You also learned how to verify that packages were upgraded.