DEV Community

Rob Porter
Rob Porter

Posted on

How to do Security Updates only with Yum in CentOS

This is a fairly basic "just the security updates, please!" guide for CentOS 6+.

This assumes you're root or have used sudo su.

First, you may need to ensure you have the yum security plugin:

rpm -qa | grep -i yum-plugin-security

If you don't, you can update it with the following.

yum install yum-plugin-security

Now let's check if there are updates:

yum --security check-update

If there are available updates, there will be results after this command.

To update, run the updater with the option --security to specify security updates only.

yum update --security

That's it!

Is something badly out of date? Did this work for you? Please post a comment to help others who might use this for guidance. I originally wrote these instructions around 2013.

Latest comments (1)

Collapse
 
strangeman profile image
Anton Markelov

Unfortunately, default CentOS repositories do not provide information about security patches, this article works only for EPEL repo.

Another solution: caseylabs.com/centos-automatic-sec...