• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to list or install only security updates with dnf in CentOS/RHEL 8

by admin

Question: Is it possible to limit dnf so that it lists or installs only security updates? How to patch the system only with security errata?

This post explains how to list and install security updates using dnf on CentOS/RHEL 8.

To list security updates

1. To list advisories about newer versions of installed packages (default):

# dnf updateinfo list --security

or

# dnf updateinfo list --security --available

2. To list advisories about any versions of installed packages:

# dnf updateinfo list --security --all

3. To list advisories about equal and older versions of installed packages:

# dnf updateinfo list --security --installed

4. To list security updates based on severity (Critical, Important, Moderate, Low):

# dnf updateinfo list --security --sec-severity [Severity]

To install security updates

1. To include security relevant packages, in updates:

# dnf upgrade --security

2. To include packages needed to fix the given advisory or advisories, in updates:

# dnf upgrade --advisory ELSA-xxxx-xxxx

or

# dnf upgrade --advisories ELSA-xxxx-xxxx,ELSA-yyyy-yyyy

3. To include packages needed to fix the given CVE(s), in updates:

# dnf upgrade --cve CVE-xxxx-xxxx,CVE-yyyy-yyyy

For more details, refer man page for dnf.

# man dnf

Filed Under: CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. Command line parameters in shell scripts
  2. CentOS / RHEL 7 : GRUB2 configuration file /boot/grub2/grub.cfg explained
  3. How to recover GRUB (Corrupted boot partition) in CentOS/RHEL 5,6
  4. How to Boot KVM Guest into a Rescue shell
  5. nitrogen Command Examples in Linux
  6. How to Install apt-utils with apt-get?
  7. CentOS / RHEL : How to Recover from deleted /etc/passwd file
  8. 3 Ways of Increasing Swap Space on Linux
  9. What is the difference between insmod and modprobe
  10. mkswap Command Examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright