YUM/DNF Configuration
Overview
This page documents the system package manager configuration used on Skynet hosts. It explains what the DNF/YUM configuration file does, shows a sample configuration, and tells you where this documentation and the configuration file belong in the repository and on hosts.
What this file does
- DNF (and YUM on older systems) reads configuration from
/etc/dnf/dnf.conf(or/etc/yum.conf). - The configuration controls global behavior such as output coloring, the number of kernel packages to keep (
installonly_limit), repository behaviour, and various timeouts and caching options.
Example configuration
Below is an annotated example of a minimal dnf.conf snippet that was previously shown on this page:
# see `man dnf.conf` for defaults and possible options
[main]
color=always
# Color codes control how package lists and updates are highlighted
color_list_installed_older=yellow
color_list_installed_newer=bold,yellow
color_list_installed_reinstall=dim,cyan
color_list_installed_running_kernel=bold,underline
color_list_installed_extra=bold,red
color_list_available_upgrade=bold,blue
color_list_available_downgrade=dim,magenta
color_list_available_install=bold,cyan
color_list_available_reinstall=bold,underline,green
color_list_available_running_kernel=bold,underline
color_search_match=bold,magenta
color_update_installed=bg:red
color_update_local=dim,green
color_update_remote=bold,green
# Keep only the most recent two installed kernels (adjust per policy)
installonly_limit=2
How to apply this configuration
- The configuration file used by DNF/YUM on each host is
/etc/dnf/dnf.conf(or/etc/yum.confon older systems). To apply the example settings, place the snippet into/etc/dnf/dnf.confon the host and save the file. - DNF reads its configuration on each invocation; no service restart is required. To refresh repository metadata and caches after changes, run:
References
man dnf.conf— system manual for DNF configuration options.