How to install security updates from the command line in Ubuntu

Sometimes you may want to just install the security updates on your server or PC

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

The apt update and upgrade command install all the updates including the software updates and the official security updates. In case 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:

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! Hope you learned something new today at FOSS Linux. Have a good one.

Kiran Kumar
Hi there! I'm Kiran Kumar, founder of FOSSLinux.com. I'm an avid Linux lover and enjoy hands-on with new promising distros. Currently, I'm using Ubuntu as a daily driver and run several other distros such as Fedora, Solus, Manjaro, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I'm not writing for FOSSLinux, I'm seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread Linux love!. If you find a time, drop me an email or feedback from the 'Contact' page. Or simply leave a comment below if you found this article useful. Have a good day!

LEAVE A REPLY

Please enter your comment!
Please enter your name here

STAY CONNECTED

24,261FansLike
192FollowersFollow

LATEST ARTICLES

How to create a Fedora Games Live USB drive in Linux

One of the best Fedora spins that has been for a while and also being well maintained is the Fedora Games. The Fedora Games spin is a great showcase of the best games available in the Fedora operating system.
Application Launchers for Ubuntu
Ubuntu is one of the most used Linux distributions worldwide. It is also the reason why it has the maximum number of available programs for itself. Today we are going to talk about one category of those programs, the application launchers.
Test drive linux online
Enter DistroTest.net, a website that allows Linux users to test various distros online, without downloading the ISO or installing the distro. With DistroTest.net, you can check a distro with no muss, no fuss.
cool and fun linux commands
The real purpose of this article is to help Linux newbies get comfortable and confident with the Linux command-line.  While knowledge and comfort of the Linux GUI allow great power, it is the mastery of the command line, or CLI, affords the Linux user unlimited power and certifies them as a Linux power user well on their way to becoming an expert.