dnf-automatic - Linux
Overview
dnf-automatic is a tool for managing automatic software updates on Red Hat Enterprise Linux (RHEL) and its derivatives. It provides a centralized and convenient way to configure and control updates, ensuring system stability and security.
Syntax
dnf-automatic [operation] [options]
Operations:
- update: Check for and apply updates
- config: Configure update settings
- enable: Enable automatic updates
- disable: Disable automatic updates
- info: Display information about automatic updates
Options/Flags
- -d, –downloadonly: Download updates without installing
- -e, –exclude: Exclude specific packages from updates
- -i, –installonly: Install updates without downloading
- -r, –refresh: Refresh metadata before checking for updates
- -t, –timestamp: Install updates with a specific timestamp
- –no-cache: Bypass the cache during update operations
- –releasever: Specify the release version for package updates
- –security: Update only security updates
Examples
Basic example (update system):
dnf-automatic update
Download updates and enable automatic updates:
dnf-automatic downloadonly
dnf-automatic enable
Exclude a particular package from updates:
dnf-automatic --exclude 'package-name' update
Install updates with a specific timestamp:
dnf-automatic --timestamp '202301010000' install
Common Issues
- Updates not being applied: Verify that automatic updates are enabled (
dnf-automatic info
) and check for any conflicts or errors in the update logs. - Package conflicts: Resolve any package conflicts by manually installing or removing the conflicting packages.
- Network connectivity issues: Ensure that the system has internet connectivity before attempting updates.
Integration
Combine with ‘cron’ for scheduled updates:
crontab -e
00 00 * * * dnf-automatic update
Use with ‘dnf-plugin-system-upgrade’ for system upgrades:
dnf install dnf-plugin-system-upgrade dnf-automatic
dnf-automatic enable
dnf-system-upgrade download --releasever=Next
Related Commands
- dnf: Command-line package manager
- yum: Legacy package manager (replaced by dnf)
- dnf-plugin-system-upgrade: Tool for performing system upgrades