Skip to content

Configure dnf-automatic to Install Only Security Updates

An XCCDF Rule

Description

To configure dnf-automatic to install only security updates automatically, set upgrade_type to security under [commands] section in /etc/dnf/automatic.conf.

Rationale

By default, dnf-automatic installs all available updates. Reducing the amount of updated packages only to updates that were issued as a part of a security advisory increases the system stability.

ID
xccdf_org.ssgproject.content_rule_dnf-automatic_security_updates_only
Severity
Low
References
Updated



Remediation - Shell Script


found=false

# set value in all files if they contain section or key
for f in $(echo -n "/etc/dnf/automatic.conf"); do
    if [ ! -e "$f" ]; then