• 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. restorecon Command Examples in Linux
  2. Linux Boot Process
  3. compsize Command Examples in Linux
  4. tail command examples in UNIX/Linux
  5. Linux OS Service ‘psacct’
  6. CentOS / RHEL 6 : How to force a NTP sync with the NTP server(s)
  7. mycli Command Examples in Linux
  8. Oracle OS watcher (OSWatcher) – Understanding oswiostat
  9. How to recover deleted Logical volume (LV) in LVM using vgcfgrestore
  10. physlock: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • bash Command Examples
  • bash-it: A collection of community contributed Bash commands and scripts for Bash 3.2+
  • basename Command Examples (Remove leading directory portions from a path)
  • base64 Command Examples (Encode or decode file or standard input to/from Base64, to standard output)

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright