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:
- Install the
yum-security
plugin:sudo yum install yum-plugin-security
- Check for available security updates:
sudo yum update-minimal --security
- Apply the available security updates:
sudo yum update-minimal --security --sec-severity=Critical
Explanation:
update-minimal
is ayum-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.
Note: 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.