Skip to content
TrySitePrice

Yum Command Check and Apply Only Security Updates

Best/Tutorial

You can use the yum command to check and apply only security updates on a Red Hat or CentOS system. The yum-security plugin provides this functionality.

Here's how you can do it:

  1. Install the yum-security plugin:

    sudo yum install yum-plugin-security

  2. Check for available security updates:

    sudo yum update-minimal --security

  3. Apply the available security updates:

    sudo yum update-minimal --security --sec-severity=Critical

rnExplanation:
  • update-minimal is a yum-security command that only updates packages that have security updates available.
  • --security option specifies that only security updates should be considered.
  • --sec-severity=Critical option specifies that only critical security updates should be installed.
rnNote: The yum-security plugin is available in Red Hat Enterprise Linux and CentOS, but not in Fedora. If you're using Fedora, you'll need to use a different method to manage security updates.