DNF5.CONF(5)
π NAME π
okay so bestie, this is dnf5.conf(5) from the dnf5 manual β aka the DNF5 Configuration Reference. π
β¨
πΈ DESCRIPTION πΈ
DNF5 by default uses the global configuration file at /etc/dnf/dnf.conf. π«Ά
The configuration file has INI format consisting of section declaration and name=value options below each on separate line. There are two types of sections in the configuration files: main and repository. The main section defines all global configuration options and should be only one. π
The repository sections define the configuration for each (remote or local) repository. The section name of the repository in brackets serve as repo ID reference and should be unique across configuration files. The allowed characters of repo ID string are lower and upper case alphabetic letters, digits, -, _, . and :. The minimal repository configuration file should aside from repo ID consists of baseurl, metalink or mirrorlist option definition. π
β¨ [MAIN] OPTIONS β¨
allow_downgrade β boolean
If enabled, DNF5 allows downgrading packages while resolving dependencies. π
- Default:
True.
allow_vendor_change β boolean
If disabled, DNF5 will stick to the original vendor during RPM upgrades or downgrades. This preference, however, can be fine-tuned using Vendor change policies <# dnf5-vendor-change-policy-label>. π§
- Default:
True.
Warning: This option is currently not supported for downgrade and distro-sync commands. π
assumeno β boolean
If enabled DNF5 will assume No where it would normally prompt for confirmation from user input. π ββοΈ
- Default:
False.
assumeyes β boolean
If enabled DNF5 will assume Yes where it would normally prompt for confirmation from user input (see also defaultyes). β
- Default:
False.
best β boolean
If True, instructs the solver to either use a package with the highest available version or fail. If False, do not fail if the latest version cannot be installed and go with the lower version. π
- Default:
True.
Note: This option in particular can be overridden by a distribution-specific configuration. For more details see drop-in configuration directories. π
cachedir β string
Path to a directory used by various DNF5 subsystems for storing cache data including repositories metadata and downloaded packages. Has a reasonable root-writable default depending on the distribution. DNF5 needs to be able to create files and directories at this location. ποΈ
- Regular user default:
~/.cache/libdnf5. - For superuser the value is overwritten by
system_cachediroption.
cacheonly β string
Can be all, metadata, none. π
If set to all DNF5 will run entirely from system cache, will not update the cache and will use the system cache even if it is expired.
If set to metadata DNF5 will cache metadata only.
- Default:
none.
Note: API Notes: Must be set before repository objects are created. Plugins must set this in the pre_config hook. Later changes are ignored. β οΈ
check_config_file_age β boolean
If enabled DNF5 should automatically expire metadata of repos, which are older than their corresponding configuration file (usually the dnf.conf file and the foo.repo file). β³
- Default:
True.
Note: Expire of metadata is also affected by metadata age. See also metadata_expire. π°οΈ
clean_requirements_on_remove β boolean
If enabled, DNF5 will remove dependencies that are no longer used during dnf remove. A package only qualifies for removal via clean_requirements_on_remove if it was installed through DNF5 but not on explicit user request, i.e. it was pulled in as a dependency. π§Ή
installonlypkgs are never automatically removed.
- Default:
True.
debugdir β string
Location where libsolv debug files will be created when enabled by debug_solver. π
- Default:
./debugdata.
debug_solver β boolean
If enabled, libsolv debug files will be created when solving the transaction. The debug files are created in the debugdir directory. π
- Default:
False.
defaultyes β boolean
If enabled, the default answer to user confirmation prompts will be Yes. Not to be confused with assumeyes which will not prompt at all. π
- Default:
False.
destdir β string
Redirect downloaded packages to provided directory. π¦
- Default:
<package repository cachedir>/packages
exclude_from_weak β list
Prevent installing packages as weak dependencies (recommends or supplements). The packages can be specified by a name or a glob and separated by a comma. π«
- Defaults to
[].
exclude_from_weak_autodetect β boolean
If enabled, DNF5 will autodetect unmet weak dependencies (recommends or supplements) of packages installed on the system. Providers of these weak dependencies will not be installed by dnf as weak dependencies any more (they will still be installed if pulled in as a regular dependency). π€
- Defaults to
true.
excludeenvs β list
Exclude environments, specified by an id or a glob and separated by a comma, from all operations. π
Can be disabled using disable_excludes config option.
- Default:
[].
excludegroups β list
Exclude groups, specified by an id or a glob and separated by a comma, from all operations. π₯
Can be disabled using disable_excludes config option.
- Default:
[].
gpgcheck
Due to compatibility gpgcheck option is supported as well but pkg_gpgcheck is preferred. The meaning of gpgcheck is controlled by the gpgcheck_policy option. π
- Default:
pkg_gpgcheckvalue.
gpgcheck_policy β legacy, full, or all
Controls how the gpgcheck option expands when explicitly set in a configuration section. π΅οΈββοΈ
legacyβgpgcheck=1sets onlypkg_gpgcheck=1. This preserves the original DNF behavior.fullβgpgcheck=1sets bothpkg_gpgcheck=1andrepo_gpgcheck=1.allβgpgcheck=1setspkg_gpgcheck=1,repo_gpgcheck=1, andlocalpkg_gpgcheck=1.
Explicitly setting pkg_gpgcheck, repo_gpgcheck, or localpkg_gpgcheck in the same configuration section overrides the policy for that specific option.
The policy is a global setting defined in [main] and affects all repository sections that use gpgcheck.
- Default:
legacy.
group_package_types β list
List of the following: optional, default, mandatory or conditional. π
Tells DNF5 which type of packages in groups will be installed when group install <group-spec> or install @<group-spec> is called.
- Default:
default,mandatory,conditional.
ignorearch β boolean
If enabled, RPM will allow attempts to install packages incompatible with the CPU's architecture. π»
- Default:
False.
installonlypkgs β list
List of provide names of packages that should only ever be installed, never upgraded. Kernels in particular fall into this category. These packages are never removed by dnf autoremove even if they were installed as dependencies (see clean_requirements_on_remove for auto removal details). This option append the list values to the default installonlypkgs list used by DNF5. The number of kept package versions is regulated by installonly_limit. π§
installonly_limit β integer
Number of installonly packages allowed to be installed concurrently. π’
1 is explicitly not allowed since it complicates kernel upgrades due to protection of the running kernel from removal.
Minimum is 2.
0 means unlimited number of installonly packages.
- Default:
3.
installroot β string
The root of the filesystem for all packaging operations. It requires an absolute path. See also --installroot commandline option. π
- Default:
/.
install_weak_deps β boolean
If enabled, when a new package is about to be installed, all packages linked by weak dependency relation (Recommends or Supplements flags) with this package will be pulled into the transaction. π«
- Default:
True.
keepcache β boolean
If enabled, keeps downloaded packages in the cache. If disabled cache will persist until the next successful transaction even if no packages have been installed. πΎ
- Default:
False.
logdir β string
Directory where the log files will be stored. π
- Regular user default:
~/.local/state. - Superuser default:
/var/log.
log_rotate β integer
Log files are rotated log_rotate times before being removed. If log_rotate is 0, the rotation is not performed. π
- Default:
4.
log_size β storage size
Log files are rotated when they grow bigger than log_size bytes. If log_size is 0, the rotation is not performed. π
The size applies for individual log files, not the sum of all log files. See also log_rotate.
- Default:
1M.
module_platform_id β string
Set this to $name:$stream to override PLATFORM_ID detected from /etc/os-release. It is necessary to perform a system upgrade and switch to a new platform. π
- Default: empty.
module_stream_switch β boolean
If enabled, allows switching enabled streams of a module. π
- Default:
False.
multilib_policy β string
Controls how multilib packages are treated during install operations. βοΈ
Can either be best for the depsolver to prefer packages which best match the system's architecture, or all to install packages for all available architectures.
- Default:
best.
obsoletes β boolean
If it's switched on, DNF5 uses obsoletes processing logic β meaning it checks whether any dependencies of a given package are no longer required, and then removes them. π
This is lowkey a lifesaver when you're doing distribution level upgrades, bestie, fr fr.
It has effect during install/upgrade processes.
Command-line option: --obsoletes
Default: True.
optional_metadata_types π
Type: list
The lil menu you can pick from, and it's exactly these: comps, filelists, other, presto, updateinfo, all
This one decides which types of metadata get loaded on top of the essential primary and modules metadata β and those two are always loaded, non-negotiable, they're the main characters. π«Ά Heads up tho: individual DNF commands may extend this list at runtime.
Note: the list only includes metadata types that DNF actually recognizes. But a repository's metadata can absolutely contain other types too (e.g., AppStream, or metadata stored as databases instead of XML files). The special value all means all metadata types present in the repository, including the ones DNF has never heard of. π
Default: comps,updateinfo
persistdir
Type: string
The directory where DNF5 stores its persistent data between runs. It's the lil vault where the important stuff lives. π
Default: /var/lib/dnf.
persistence
Type: string
Whether changes should persist across system reboots. If you pass --transient (see transient option), that overrides this setting and forces transient. Valid values are:
auto: changes will persist across reboots, unless the target is a running bootc system and the system is already in an unlocked state (i.e./usris writable).transient: changes will be lost on the next reboot. Only applicable on bootc systems. Beware that changes to/etcand/varwill persist, depending on the configuration of your bootc system. See alsohttps://bootc.dev/bootc//man/bootc-usr-overlay.8.html.persist: changes will persist across reboots.
Default: auto.
pluginconfpath
Type: list
A list of directories that get searched for libdnf5 plugin configurations to load. π¦
Every configuration file found in these directories that's named the same as a plugin gets parsed.
Default: /etc/dnf/libdnf5-plugins.
pluginpath
Type: list
A list of directories that get searched for libdnf5 plugins to load. Plugins found in any of the directories in this configuration option are used. No picking favourites here, bestie. β¨
Default: /usr/lib64/libdnf5/plugins/
plugins
Type: boolean
If enabled, libdnf5 plugins are enabled. That's it, that's the whole vibe. π
Default: True.
protected_packages
Type: list
This append list option holds the names of packages that DNF5 should never completely remove. π‘οΈ
They're protected via Obsoletes as well as user/plugin removals.
An entry prefixed with glob:, such as glob:/path/to/dir/*.conf, expands to all matching files and reads one package per line from each.
Default: dnf5,glob:/etc/dnf/protected.d/*.conf.
Note: DNF5 will protect also the package corresponding to the running version of the kernel. See also the protect_running_kernel option.
protect_running_kernel
Type: boolean
Controls whether the package corresponding to the running version of the kernel is protected from removal. Your kernel said "not today" and honestly? Iconic. π
Default: True.
Note: YUM compatibility option
recent
Type: integer
Sets the time period, in days, that gets used for the --recent option in the repoquery, info and list commands. β
Default: 7
reposdir
Type: list
Repository configuration files locations.
The behavior of reposdir could differ when it is used along with the --installroot option. (iykyk π)
Default: [/etc/yum.repos.d, /etc/distro.repos.d, /usr/share/dnf5/repos.d]
skip_broken
Type: boolean
If enabled, DNF5 will skip uninstallable packages instead of just failing while resolving dependencies. It's giving "we move on" energy. π§
Default: False.
skip_system_repo_lock
Type: boolean
Skip acquiring a lock on the system repository (equivalent to the RPM database). That lock exists to stop processes from reading the system repository while another process is running a transaction. Unprivileged users are allowed to acquire a read lock on the system repository, so skip_system_repo_lock=true may be used to ignore their lock.
skip_unavailable
Type: boolean
If enabled, DNF5 will skip unavailable packages instead of failing while preparing rpm transactions. π
Default: False.
system_cachedir
Type: string
For superuser, this overwrites the cachedir option value.
It allows one to differentiate user and superuser cachedir. π
Default: /var/cache/libdnf5.
system_state_dir
Type: string
System state files location. See dnf5-system-state(7), system state for details. π
Default: /usr/lib/sysimage/libdnf5.
transaction_history_dir
Type: string
History database location.
By default it has the same value as system_state_dir.
tsflags
Type: list
A list of strings that add extra flags for the RPM transaction. Here's the whole matching-up, bestie:
noscriptsβRPMTRANS_FLAG_NOSCRIPTStestβRPMTRANS_FLAG_TESTnotriggersβRPMTRANS_FLAG_NOTRIGGERSnodocsβRPMTRANS_FLAG_NODOCSjustdbβRPMTRANS_FLAG_JUSTDBnocontextsβRPMTRANS_FLAG_NOCONTEXTSnocapsβRPMTRANS_FLAG_NOCAPSnocryptoβRPMTRANS_FLAG_NOFILEDIGESTdeploopsβRPMTRANS_FLAG_DEPLOOPSnopluginsβRPMTRANS_FLAG_NOPLUGINS
The nocrypto option will also set the _RPMVSF_NOSIGNATURES and _RPMVSF_NODIGESTS VS flags.
The test option provides a transaction check without performing the transaction. It includes downloading of packages, OpenPGP keys check (including permanent import of additional keys if necessary), and rpm check to prevent file conflicts. π
The noplugins option disables use of rpm plugins.
Default: empty.
use_host_config
Use configuration files and variable definitions from the host system rather than the installroot. See dnf5-installroot(7) for more info. π
Default: False.
usr_drift_protected_paths
Type: list
A list of paths that are likely to cause problems when their contents drift with respect to /usr, e.g. /etc/pam.d/*. If a transient transaction would modify these paths, DNF5 aborts the operation and prints an error. No cap, it just stops.
When using persistence=transient on bootc systems, a transient overlay is created on /usr, and any changes DNF5 makes to /usr will be discarded on reboot. However, other paths such as /etc and /var are (often) not backed by a transient overlay, so changes to them will persist across reboots. Usually this "filesystem drift" is fine, but it can cause problems in certain situations. For example, a configuration file in /etc that's shared by multiple packages might reference a .so file under /usr/lib64 that no longer exists. π
If any paths are protected by this option, DNF5 will download filelist metadata from repositories before resolving transient transactions.
An entry prefixed with glob:, such as glob:/path/to/dir/*.conf, expands to all matching files and reads one path per line from each. Both the glob pattern in the option list entry and the individual paths listed within the files (e.g. /etc/pam.d/*) may contain globs. π
Default: glob:/etc/dnf/usr-drift-protected-paths.d/*.conf.
varsdir
Type: list
A list of directories where variables definition files are looked for. π
See variable files in Configuration reference.
Default: /etc/dnf/vars.
zchunk
Type: boolean
If enabled, repository metadata are compressed using the zchunk format (if available). Compressed and cute. π
Default: True.
β¨ [MAIN] OPTIONS - COLORS β¨
okay so this is the part where you get to make your terminal look like a sunset, bestie π every one of these takes a color value, and every single one has a default so you don't even have to touch them if you don't want to. but like. you could. π
color_list_available_upgrade(color) β the color of available packages that are newer than what you've got installed. used during list operations. Default:bold,blue.color_list_available_downgrade(color) β the color of available packages that are older than what you've got installed (yes, downgrades are a thing, we don't judge π). used during list operations. Default:dim,magenta.color_list_available_reinstall(color) β the color of available packages that are identical to the installed versions and are available for reinstalls. used during list operations. Default:bold,green.color_list_available_install(color) β the color of packages that are available for installation and none of their versions is installed. used during list operations. Default:bold,cyan.color_update_installed(color) β the color of removed packages. this one is used while displaying transactions. Default:dim,red.color_update_local(color) β the color of local packages that are installed from the@commandlinerepository. used while displaying transactions. Default:dim,green.color_update_remote(color) β the color of packages that are installed/upgraded/downgraded from remote repositories. used while displaying transactions. Default:bold,green.color_search_match(color) β the color of the patterns matched in search output. Default:bold,magenta.
π REPO OPTIONS π
these are the options that live on a per-repository basis, iykyk. every repo can vibe differently π¦
baseurl(list) β list of URLs for the repository. Default:[]. URLs are tried in the listed order (equivalent to yum's "failovermethod=priority" behaviour).cost(integer) β the relative cost of accessing this repository, defaulting to1000. this value is compared when the priorities of two repositories are the same. the repository with the lowest cost is the one that gets picked. it's useful for making the library prefer on-disk repositories over remote ones.enabled(boolean) β include this repository as a package source. Default:True.gpgkey(list) β URLs of OpenPGP key files that can be used for signing metadata and packages of this repository. if a file can not be verified using the already imported keys, import of keys from this option is attempted and the keys are then used for verification. Default:[].metalink(string) β URL of a metalink for the repository. Default:None.mirrorlist(string) β URL of a mirrorlist for the repository. Default:None.name(string) β a human-readable name of the repository. defaults to the ID of the repository.priority(integer) β the priority value of this repository. if there's more than one candidate package for a particular operation, the one from a repo with the lowest priority value is picked, possibly despite being less convenient otherwise (e.g. by being a lower version). Default:99.type(string) β type of repository metadata. supported values are:rpm-md. aliases forrpm-md:rpm,repomd,rpmmd,yum,YUM. Default: empty.
π¦ SOURCE AND DEBUGINFO REPOSITORY NAMES π¦
okay so the naming convention here is so satisfying once you see it, bestie, it's giving pattern recognition πΈ
for a given repository with an identifier in the form "<ID>-rpms", its corresponding source repository is expected to have an identifier in the form "<ID>-source-rpms" and debuginfo repository an identifier in the form "<ID>-debug-rpms". otherwise (if the repository identifier doesn't have the "-rpms" suffix), the source repository is expected to have an identifier in the form "<ID>-source" and debuginfo repository an identifier in the form "<ID>-debuginfo".
for example, for repository "fedora", the source repository is "fedora-source" and debuginfo repository is "fedora-debuginfo". for repository "fedora-rpms", the source repository is "fedora-source-rpms" and debuginfo repository is "fedora-debug-rpms".
πΈ REPO VARIABLES πΈ
the right side of every repo option can be enriched by these variables, and honestly this is the part that makes your .repo files feel β¨aliveβ¨
$archβ refers to the system's CPU architecture e.g,aarch64,i586,i686andx86_64.$basearchβ refers to the base architecture of the system. for example,i686andi586machines both have a base architecture ofi386, and AMD64 and Intel64 machines have a base architecture ofx86_64.$releaseverβ refers to the release version of operating system which DNF5 derives from information available in RPMDB.
in addition to these hard coded variables, user-defined ones can also be used π they can be defined either via variable files, or by using special environmental variables. the names of these variables must be prefixed with DNF_VAR_ and they can only consist of alphanumeric characters and underscores:
$ DNF_VAR_MY_VARIABLE=value
to use such variable in your repository configuration remove the prefix. e.g.:
[myrepo]
baseurl=https://example.site/pub/fedora/$MY_VARIABLE/releases/$releasever
π¨ note that it is not possible to override thearchandbasearchvariables using either variable files or environmental variables. periodt.
although users are encouraged to use named variables, the numbered environmental variables DNF0 - DNF9 are still supported:
$ DNF1=value
[myrepo]
baseurl=https://example.site/pub/fedora/$DNF1/releases/$releasever
π OPTIONS FOR BOTH [MAIN] AND REPO π
some options can be applied in either the main section, per repository, or in a combination. the value provided in the main section is used for all repositories as the default value, which repositories can then override in their configuration. so like, main is the group chat default and each repo can go off and do its own thing π«Ά
bandwidth(storage size) β total bandwidth available for downloading, in bytes per second. used for both metadata and package downloads. this value is only used when thethrottleoption is set as a percentage. whenthrottleis set as an absolute value,bandwidthis ignored. Default:0(no limit).build_cache(boolean) β if enabled, DNF5 will save libsolv cache generated from downloaded metadata tocachedir. these solv files are loaded during subsequent runs which significantly speeds up DNF5. Default:True.countme(boolean) β when enabled, one (and only one) HTTP GET request for the metalink file will be selected at random every week to carry a special URL flag.
this flag allows the repository provider to estimate the number of systems consuming the repository, by counting such requests over a week's time. this method is more accurate than just counting unique IP addresses (which is subject to both overcounting and undercounting due to short DHCP leases and NAT, respectively).
this is not an out-of-band HTTP request made for this purpose alone. only requests initiated by DNF during normal operation, such as to check for metadata updates, can get this flag.
the flag is a simple "countme=N" parameter appended to the metalink URL where N is an integer representing the age "bucket" this system belongs to. four buckets are defined, based on how many full weeks have passed since the installation of a system:
- bucket
1β system age: first week - bucket
2β system age: first month (2 - 4 weeks) - bucket
3β system age: first 6 months (5 - 24 weeks) - bucket
4β system age: more than 6 months (> 24 weeks)
this number is meant to help distinguish short-lived (throwaway) machines from long-term installs and get a better picture of how systems are used over time.
to determine a system's installation time ("epoch"), the machine-id(5) file's modification time is used as the single source of truth. this file is semantically tied to the system's lifetime as it's typically populated at installation time or during the first boot by an installer tool or init system (such as systemd(1)), respectively, and remains unchanged.
if the file is empty or missing (such as in containers), the time of the very first request made using the expanded metalink URL (i.e. with any repository variables such as $releasever substituted) that carried the flag is declared as the epoch.
if no metalink URL is defined for this repository but a mirrorlist URL is, the latter is used for this purpose instead.
Default: False.
disable_excludes(list) β used to disable package, group and environment filtering. it can include a list of repository IDs (globs allowed) for which repository-specific package excludes are ignored. if it contains the special valuemain, excludes from the main configuration files are bypassed. if it contains the special value*, no excludes filtering is applied at all. π₯enablegroups(boolean) β if enabled, DNF5 will allow the use of package groups. Default:True.excludepkgs(list) β exclude packages of this repository, specified by a name or a glob and separated by a comma, from all operations. can be disabled usingdisable_excludesconfig option. Default:[].fastestmirror(boolean)
π«Ά and that's exactly where part 3 runs out of breath, bestie β fastestmirror is literally mid-sentence and part 4 picks it right back up. no cap.
If it's switched on, TCP socket latency is used to find the closest available mirror. A mirror is then selected at random with less than twice the lowest latency for load balancing purposes. This overrides the order provided by the mirrorlist/metalink file itself, and does not take into consideration mirrorlist parameters such as mirror bandwidth nor preferred mirrors for client IP addresses.
- Default:
False.
pkg_gpgcheck(boolean) β do we OpenPGP signature check the packages hanging out in this repo? That's the whole question. π- Default:
False. - Heads up bestie: this doesn't apply for packages passed directly as arguments, because those aren't in any repository at all. For those, go look at
localpkg_gpgcheck.
- Default:
includepkgs(list) β a name-or-glob list, comma separated, of packages from this repository to include in all operations.
It's the inverse of excludepkgs β DNF5 will exclude any package in the repo that doesn't match this list.
It works in conjunction with excludepkgs and doesn't override it. So if you do excludepkgs=*.i386 and includepkgs=python*, then only packages starting with python that do not have an i386 arch will be seen by DNF5 in this repo. Periodt.
Can be disabled using the disable_excludes config option.
- Default:
[].
ip_resolve(ip address) β how DNF5 resolves host names. Set it to4,IPv4,6,IPv6to resolve to IPv4 or IPv6 addresses only. Pick your fighter. π₯- Default:
whatever.
- Default:
localpkg_gpgcheck(boolean) β if enabled, DNF5 will perform an OpenPGP signature check on local packages (packages in a file, not in a repository). π- Default:
False.
- Default:
max_parallel_downloads(integer) β maximum number of simultaneous downloads. Max is20.- Default:
3.
- Default:
max_downloads_per_mirror(integer) β maximum number of simultaneous downloads per mirror. Max is20.- Default:
3.
- Default:
metadata_expire(time in seconds) β the period after which the remote repository gets checked for a metadata update, and if the vibe says yes, the local metadata cache is updated. It can be-1orneverto make the repo never considered expired.
Expire of metadata can also be triggered by a change of timestamp of configuration files (dnf.conf, <repo>.repo).
See also check_config_file_age.
- Default:
60 * 60 * 48, 48 hours.
minrate(storage size) β sets the low speed threshold in bytes per second. If the server is sending data at the same or slower speed than this value for at leasttimeoutoption seconds, DNF5 aborts the connection. Not me hanging up on a slow server π- Default:
1000.
- Default:
password(string) β the password used to connect to a repository with basic HTTP authentication.- Default: empty.
proxy(string) β URL of a proxy server to connect through.
Set to an empty string in the repository configuration to disable the proxy setting inherited from the main section. The expected format of this option is <scheme>://<ip-or-hostname>[:port]. (For backward compatibility, _none_ can be used instead of the empty string.)
- Default: empty.
- > Note: the curl environment variables (such as
http_proxy) are effective if this option is unset (or_none_is set in the repository configuration). See the curl man page for details.
proxy_username(string) β the username to use for connecting to the proxy server.- Default: empty.
proxy_password(string) β the password to use for connecting to the proxy server.- Default: empty.
proxy_auth_method(string) β the authentication method used by the proxy server. Valid values are:basicβ HTTP Basic authenticationdigestβ HTTP Digest authenticationnegotiateβ HTTP Negotiate (SPNEGO) authenticationntlmβ HTTP NTLM authenticationdigest_ieβ HTTP Digest authentication with an IE flavorntlm_wbβ NTLM delegating to winbind helpernoneβ None auth methodanyβ All suitable methods- Default:
any.
proxy_sslcacert(string) β path to the file containing the certificate authorities to verify proxy SSL certificates.- Default: empty, uses system default.
proxy_sslclientcert(string) β path to the SSL client certificate used to connect to proxy server.- Default: empty.
proxy_sslclientkey(string) β path to the SSL client key used to connect to proxy server.- Default: empty.
proxy_sslverify(boolean) β if enabled, proxy SSL certificates are verified. If the client can not be authenticated, connecting fails and the repository is not used any further. IfFalse, SSL connections can be used, but certificates are not verified. π- Default:
True.
- Default:
repo_gpgcheck(boolean) β if enabled, DNF5 will perform an OpenPGP signature check on this repository's metadata.- Default:
False. - > Note: OpenPGP keys for this check are stored separately from OpenPGP keys used in package signature verification. Furthermore, they are also stored separately for each repository.
- Default:
This means that DNF5 may ask to import the same key multiple times. For example, when a key was already imported for package signature verification and this option is turned on, it may be needed to import it again for the repository. The way that it makes you re-import the same key π iconic behavior honestly.
skip_if_unavailable(boolean) β if enabled, DNF5 will continue running and disable the repository that couldn't be synchronized for any reason. This option doesn't affect skipping of unavailable packages after dependency resolution. To check inaccessibility of repository, use it in combination with therefreshcommand line option<# refresh-option-label>.- Default:
False. - > Note: this option in particular can be overridden by a distribution-specific configuration. For more details see drop-in configuration directories.
- Default:
sslcacert(string) β path to the file containing the certificate authorities to verify SSL certificates.- Default: empty, uses system default.
sslclientcert(string) β path to the SSL client certificate used to connect to remote sites.- Default: empty.
sslclientkey(string) β path to the SSL client key used to connect to remote sites.- Default: empty.
sslverify(boolean) β if enabled, remote SSL certificates are verified. If the client can not be authenticated, connecting fails and the repository is not used any further. If disabled, SSL connections can be used, but certificates are not verified.- Default:
True.
- Default:
throttle(storage size) β limits the downloading speed, in bytes per second. Applied to both metadata and package downloads. It can be an absolute value (e.g.5Mfor 5 MiB/s) or a percentage (e.g.60%). When given as a percentage, the actual speed limit is calculated relative to thebandwidthoption value.0means no throttling. The resulting speed limit must not be lower thanminrate.- Default:
0.
- Default:
timeout(time in seconds) β number of seconds to wait for a connection before timing out. Used in combination withminrateoption option.- Default:
30.
- Default:
username(string) β the username to use for connecting to repo with basic HTTP authentication.- Default: empty.
user_agent(string) β the User-Agent string to include in HTTP requests sent by DNF5. π¦- Default:
libdnf (NAME VERSION_ID; VARIANT_ID; OS.BASEARCH)
- > Note:
NAME,VERSION_IDandVARIANT_IDare OS identifiers read from theos-release(5)file, andOSandBASEARCHare the canonical OS name and base architecture, respectively. Example:
libdnf (Fedora 39; server; Linux.x86_64)
β¨ TYPES OF OPTIONS β¨
Okay bestie, before you go wild in the config files, you gotta know what kind of values each option will actually accept. Vibe check your data types, fr fr π
booleanβ the iconic two-option queen. Only two possible values exist here, no in-between, no "it's complicated."
You can use one of these: 1, 0, True, False, yes, no.
colorβ a string that describes a color plus modifiers, all comma-separated, likered,bold.- Colors:
black,blue,cyan,green,magenta,red,white,yellow. - Modifiers:
bold,blink,dim,normal,reverse,underline.
- Colors:
integerβ a whole number. Written without a fractional component, so no decimal drama allowed π«ip address typeβ a string describing ip address types.
One of these can be used: 4, IPv4, 6, IPv6.
listβ a string that's secretly one or more strings, separated by space or comma characters. The backslash'\'can escape any character, which lets you include it literally inside an individual string. Sneaky but slay.
Example: 'item1,item2\,with\,commas,item3\ with\ spaces item4'
storage sizeβ a string for storage sizes in bytes, formed by an integer plus a unit.
Valid units are k, M, G.
stringβ a sequence of symbols or digits with no whitespace character anywhere in it. Keep it tight.time in secondsβ a string representing time units in seconds. Can be set to-1ornever. (So yes, you can literally say "never" and the config will understand. Main character energy.)
ποΈ DROP-IN CONFIGURATION DIRECTORIES ποΈ
DNF5 loads configuration options that are defined in the main configuration file, user configuration files and distribution configuration files. Three sources, one truth. Let's go π
The configuration files are processed following this order:
- Configuration files are alphabetically sorted in a list of names from the distribution configuration directory and the user configuration directory. If a file with the same name is present in both directories, only the file from the user configuration directory is added to the list. The distribution file is then masked by the user file. (User file said "not today" π )
- Options are retrieved in order from the list. The configuration from the next file overrides the previous one. The last option wins. Periodt.
Example of configuration files
User configuration files:
/etc/dnf/dnf.conf/etc/dnf/libdnf5.conf.d/20-user-settings.conf/etc/dnf/libdnf5.conf.d/60-something.conf/etc/dnf/libdnf5.conf.d/80-user-settings.conf
Distribution configuration files:
/usr/share/dnf5/libdnf.conf.d/50-something.conf/usr/share/dnf5/libdnf.conf.d/60-something.conf/usr/share/dnf5/libdnf.conf.d/90-something.conf
Resulting file loading order by default
(/usr/share/dnf5/libdnf.conf.d/60-something.conf is skipped, masked by the user file /etc/dnf/libdnf5.conf.d/60-something.conf):
/etc/dnf/libdnf5.conf.d/20-user-settings.conf/usr/share/dnf5/libdnf.conf.d/50-something.conf/etc/dnf/libdnf5.conf.d/60-something.conf/etc/dnf/libdnf5.conf.d/80-user-settings.conf/usr/share/dnf5/libdnf.conf.d/90-something.conf/etc/dnf/dnf.conf
Files and directories
- User Configuration Directory β
/etc/dnf/libdnf5.conf.d/ - User Configuration Files β
/etc/dnf/libdnf5.conf.d/20-user-settings.conf - Distribution Configuration Directory β
/usr/share/dnf5/libdnf.conf.d/ - Distribution Configuration Files β
/usr/share/dnf5/libdnf.conf.d/50-something.conf
π¦ DROP-IN REPO DIRECTORIES π¦
After the repository configurations are loaded, other repo configurations can be overloaded from the directories user repos override directory and distribution repos override directory. Round two, but for repos β¨
The format of the files inside the directories is the same as the format of the repository configuration files. The options in the overridden files can modify existing repos but cannot create new repositories. Sorry babe, no making new repos here.
Override files support globs in the repository ID in order to support bulk modifications of repository parameters. Bulk edits are so efficient, we love to see it π«Ά
The repository overrides are processed following this order:
- Files from
/usr/share/dnf5/repos.override.d/and/etc/dnf/repos.override.d/are loaded in an alphabetically sorted list. In case files have the same name, the file from/etc/dnf/repos.override.d/is used. This implies the list has only unique filenames. This also implies that the repository configuration files can be simply masked by creating a file with the same name in the/etcoverride directory. - The options from the files are applied in the order they are loaded. The last option wins.
Note: See also the documentation for Config-manager Command to see where the overrides are used.
Example configuration
# Enable `skip_if_unavailable` for all repositories
[*]
skip_if_unavailable = true
# And then disable `skip_if_unavailable` for repositories with id prefix "fedora"
[fedora*]
skip_if_unavailable = false
Example of configuration files
This example shows the order in which override files are processed.
Files with user repos overrides:
/etc/dnf/repos.override.d/20-user-overrides.repo/etc/dnf/repos.override.d/60-something2.repo/etc/dnf/repos.override.d/80-user-overrides.repo/etc/dnf/repos.override.d/99-config-manager.repo
Files with distribution repos overrides:
/usr/share/dnf5/repos.override.d/50-something2.repo/usr/share/dnf5/repos.override.d/60-something2.repo/usr/share/dnf5/repos.override.d/90-something2.repo
Resulting file processing order:
/etc/dnf/repos.override.d/20-user-overrides.repo/usr/share/dnf5/repos.override.d/50-something2.repo/etc/dnf/repos.override.d/60-something2.repo/etc/dnf/repos.override.d/80-user-overrides.repo/usr/share/dnf5/repos.override.d/90-something2.repo/etc/dnf/repos.override.d/99-config-manager.repo
Files and directories
- User Repos Override Directory β
/etc/dnf/repos.override.d/ - User Repos Override Files β
/etc/dnf/repos.override.d/20-user-overrides.repo - Distribution Repos Override Directory β
/usr/share/dnf5/repos.override.d/ - Distribution Repos Override Files β
/usr/share/dnf5/repos.override.d/50-something2.repo
π FILES π
- Main Configuration File β
/etc/dnf/dnf.conf - Cache Files β
/var/cache/libdnf5 - Repository Files β
/etc/yum.repos.d/ - Variables β Any property named file in
/etc/dnf/varsis turned into a variable named after the filename (or overrides any of the above variables but those set from commandline). Filenames may contain only alphanumeric characters and underscores and be in lowercase. Variables are also read from/etc/yum/varsfor YUM compatibility reasons. Nostalgic but make it functional π
π DIRECTORIES π
Repository Directories
Directories are listed in the order in which they are processed.
Note: Unlike overrides that modify an existing repository configuration, the configuration in these directories defines new repositories. It is not possible to define repositories with the same ID. If multiple repositories with the same ID are defined only the first configuration will be loaded. Loading the next one will log an error. So like, don't do that π
- YUM Repositories Directory β
/etc/yum.repos.d/ - Distribution Repositories Directory in
/etcβ/etc/distro.repos.d/ - Distribution Repositories Directory in
/usrβ/usr/share/dnf5/repos.d/
Variables Directories
- Variables Directory β
/etc/dnf/vars/ - Distribution Variables Directory β
/usr/share/dnf5/vars.d/
π SEE ALSO π
dnf5(8), DNF5 Command Referencednf5.conf-vendorpolicy(5), DNF5 Vendor Change Policy File Referencednf5.conf-todo(5), Options that are documented/implemented in DNF but not in DNF5dnf5.conf-deprecated(5), Config Options that are deprecated in DNF5
Author
See AUTHORS.md in dnf5 source distribution.
Copyright
Contributors to the dnf5 project.
And that's a wrap bestie, you made it to the end of the whole page ππ This one was dated Sep 24, 2026 and it's DNF5.CONF(5) β go forth and configure your heart out, you absolute icon π
π¦ where this page comes from
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- fedora 44: dnf5 5.4.6.0-1.fc44 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms