Home Terminal Tuts How to install security updates from the command line in Ubuntu

How to install security updates from the command line in Ubuntu

by Kiran Kumar
Published: Updated:
Installing security updates only

Installing updates using the command line from the Terminal is done by using the apt update and upgrade commands. For those who aren’t aware of it, check the step-by-step tutorial we published earlier.

The apt update and upgrade command installs all the updates, including the software updates and the official security updates. If you only want to install just the security updates and not all the application updates, you can do that too. Here is how:

Installing just the security updates in Ubuntu and derivatives

This tutorial is tested on Ubuntu 18.04 but should work without any issues in other Ubuntu derivatives, including Linux Mint, elementary OS, and others.

Step 1) Launch the Terminal.

Step 2) You can check if any security updates are available by using the following command. Note that the following command doesn’t install anything. It’s a dry run simulating what is going to happen.

sudo unattended-upgrade --dry-run -d

Note the usage of the dry run. It means the update check is only a simulation. Nothing will be downloaded or installed. -d is used to display the result in the terminal.

Step 3) In the above command, if you see “No packages found that can be upgraded unattended and no pending auto-removals” in the Terminal, this implies your PC is up-to-date. If you see updates available, you can install them by using the below command:

sudo unattended-upgrade -d

That’s it! I hope you learned something new today at FOSS Linux. Have a good one.

You may also like

Leave a Comment

fl_logo_v3_footer

ENHANCE YOUR LINUX EXPERIENCE.



FOSS Linux is a leading resource for Linux enthusiasts and professionals alike. With a focus on providing the best Linux tutorials, open-source apps, news, and reviews written by team of expert authors. FOSS Linux is the go-to source for all things Linux.

Whether you’re a beginner or an experienced user, FOSS Linux has something for everyone.

Follow Us

Subscribe

©2016-2023 FOSS LINUX

A PART OF VIBRANT LEAF MEDIA COMPANY.

ALL RIGHTS RESERVED.

“Linux” is the registered trademark by Linus Torvalds in the U.S. and other countries.