DNF4.CONF(5)
π NAME π
hey bestie, welcome to dnf4.conf(5) β the DNF Configuration Reference, i.e. the sacred text of "how tf do I tell dnf what I want" π
bookmark it, you'll be back.
π DESCRIPTION π
DNF (the source lives at https://github.com/rpm-software-management/dnf/) by default reads the global config file at /etc/dnf/dnf.conf plus every *.repo file it finds under /etc/yum.repos.d. That second location is typically where your repository config hangs out, and it takes precedence over the global config. okay so like, repo files win, noted π
The config file is in INI format β that means a section declaration, then name=value options, each one on its own separate line underneath. There are exactly two flavors of section in these files: main and repository.
- The main section holds all the global configuration options, and there should only ever be one of them. one main section. not two. don't do it π
- The repository sections define the config for each (remote or local) repo. The section name in brackets is the repo ID reference, and it needs to be unique across all your config files.
The characters allowed in a repo ID string are: lower and upper case alphabetic letters, digits, -, _, . and :. that's the whole guest list, no plus-ones ποΈ
The minimal repository config file should β aside from the repo ID β consist of a baseurl, metalink or mirrorlist option definition. one of those three, pick your fighter β¨
π DISTRIBUTION-SPECIFIC CONFIGURATION π
A couple of options β specifically best and skip_if_unavailable β can be set in the DNF configuration file by your distribution, so they can override the DNF defaults. your distro gets to have an opinion here, respect it π«Ά
π [MAIN] OPTIONS π
okay beloved, this is the big one. main character energy only.
allow_vendor_changeboolean β if it's disabled, dnf will stick to the vendor when upgrading or downgrading rpms. Default isTrue.
β οΈ Warning: this option is currently not supported for thedowngradeanddistro-synccommands.
archstring β the architecture used for installing packages. By default it's auto-detected. Often used together with theignorearchoption.assumenoboolean β if enabled, dnf will assume No wherever it would normally stop and prompt you for confirmation. Default isFalse.assumeyesboolean β if enabled, dnf will assume Yes wherever it would normally prompt you for confirmation (peepdefaultyestoo). Default isFalse.autocheck_running_kernelboolean β automatic check whether there's an installed newer kernel module with a security update than the kernel you're currently running. Default isTrue.basearchstring β the base architecture used for installing packages. By default this is auto-detected.bestboolean βTruetells the solver to either use a package with the highest available version or just fail. OnFalse, don't fail if the latest version can't be installed β go with the lower version. Default isFalse. Lowkey important: this option in particular can be set in your config file by your distribution. Also, the use of the highest available version is only guaranteed for the packages directly requested, not for their dependencies. so no, it doesn't magically drag the whole dep tree to latest, sorry bestie πcachedirstring β path to a directory used by various DNF subsystems for storing cache data. It has a reasonable root-writable default depending on the distribution. DNF needs to be able to create files and directories at this location. it needs write access, periodt.cacheonlyboolean β if set toTrue, DNF will run entirely from the system cache, will not update the cache, and will use it even if it's expired. Default isFalse.
API Notes: must be set before repository objects are created. Plugins must set this in the pre_config hook. Later changes are ignored. (the way that timing matters hereβ¦ π)
check_config_file_ageboolean β specifies whether dnf should automatically expire the metadata of repos that are older than their corresponding configuration file (usually thednf.conffile and thefoo.repofile). Default isTrue(perform the check). The expiring of metadata is also affected by metadata age β see alsometadata_expire.clean_requirements_on_removeboolean β remove dependencies that are no longer used duringdnf remove. A package only qualifies for removal viaclean_requirements_on_removeif it was installed through DNF but not on explicit user request β i.e. it got pulled in as a dependency. Default isTrue. (installonlypkgsare never automatically removed. never ever π )config_file_pathstring β path to the default main configuration file. Default is/etc/dnf/dnf.conf.debuglevelinteger β debug messages output level, in the range0to10. The higher the number, the more debug output gets put to stdout. Default is2.debug_solverboolean β controls whether the libsolv debug files should be created when solving the transaction. The debug files are created in the./debugdatadirectory. Default isFalse.defaultyesboolean β if enabled, the default answer to user confirmation prompts will be Yes. Not to be confused withassumeyes, which won't prompt at all. Default isFalse. one of them asks, one of them doesn't β they are not the same girl πdiskspacecheckboolean β controls whether rpm should check available disk space during the transaction. Default isTrue.errorlevelinteger β error messages output level, in the range0to10. The higher the number, the more error output gets put to stderr. Default is3. This is deprecated in DNF and overwritten by the--verbosecommandline option.exclude_from_weaklist β prevent installing packages as weak dependencies (recommends or supplements). The packages can be specified by a name or a glob, separated by a comma. Defaults to[].exclude_from_weak_autodetectboolean β if enabled, dnf 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 totrue. so they don't get to sneak in the weak-deps door, but the front door is still open πͺexit_on_lockboolean β should the dnf client exit immediately when something else has the lock. Default isFalse.gpgkey_dns_verificationboolean β should dnf attempt to automatically verify GPG verification keys using the DNS system. This option requires the unbound python module (python3-unbound) to be installed on the client system. This system has two main features:- The first one is to check if any of the already installed keys have been revoked. Automatic removal of the key is not yet available, so it is up to the user to remove revoked keys from the system. π that's on you, bestie
- The second feature is automatic verification of new keys when a repository is added to the system. In interactive mode, the result is written to the output as a suggestion to the user. In non-interactive mode (i.e. when
-yis used), this system will automatically accept keys that are available in the DNS and are correctly signed using DNSSEC. It will also accept keys that do not exist in the DNS system and their NON-existence is cryptographically proven using DNSSEC. This is mainly to preserve backward compatibility.
Default is False.
group_package_typeslist β a list of the following:optional,default,mandatory. Tells dnf which type of packages in groups will be installed whengroupinstallis called. Default is:default,mandatory.ignorearchboolean β if set toTrue, RPM will allow attempts to install packages incompatible with the CPU's architecture. Defaults toFalse. Often used together with thearchoption.installonlypkgslist β 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 bydnf autoremoveeven if they were installed as dependencies (seeclean_requirements_on_removefor the auto-removal details). This option appends the list values to the defaultinstallonlypkgslist used by DNF. The number of kept package versions is regulated byinstallonly_limit.installonly_limitinteger β number of installonly packages allowed to be installed concurrently. Defaults to3. The minimal number of installonly packages is2. Value0means unlimited number of installonly packages. Value1is explicitly not allowed, since it complicates kernel upgrades due to the protection of the running kernel from removal. yeah don't be that person π«installrootstring β the root of the filesystem for all packaging operations. It requires an absolute path. See also the--installrootcommandline option.install_weak_depsboolean β when this option is set toTrueand 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 isTrue.keepcacheboolean β keeps downloaded packages in the cache when set toTrue. Even if it's set toFalseand packages have not been installed, they will still persist until the next successful transaction. Default isFalse.logdirstring β directory where the log files will be stored. Default is/var/log.logfilelevelinteger β log file messages output level, in the range0to10. The higher the number, the more debug output gets put to logs. Default is9.
This option controls dnf.log, dnf.librepo.log and hawkey.log. Although dnf.librepo.log and hawkey.log are affected only by setting the logfilelevel to 10. iykyk β¨
log_compressboolean β when set toTrue, log files are compressed when they are rotated. Default isFalse.log_rotateinteger β log files are rotatedlog_rotatetimes before being removed. Iflog_rotateis0, the rotation is not performed. Default is4.log_sizestorage size β log files are rotated when they grow bigger thanlog_sizebytes. Iflog_sizeis0, the rotation is not performed. The default is1 MB. Valid units arek,M,G.
ngl, that size cap? Itβs per individual log file, not the sum of all log files, bestie. See also log_rotate for the rotation vibe. π
metadata_timer_synctime in seconds β okay so this is the minimal period between two consecutivemakecachetimer runs. If itβs been less than this time period since its last run, the command will stop immediately, no cap. It does not affect a simplemakecacherun. Use0to completely disable automatic metadata synchronizing. The default corresponds to three hours. The value is rounded to the next commenced hour. β¨module_obsoletesboolean β controls whether dnf should apply modular obsoletes when possible. Default isFalse. periodt. πmodule_platform_idstring β set this to$name:$streamto overridePLATFORM_IDdetected from/etc/os-release. It is necessary to perform a system upgrade and switch to a new platform. fr fr. π¦module_stream_switchboolean β controls whether itβs possible to switch enabled streams of a module. Default isFalse. lowkey simple. πmultilib_policystring β controls how multilib packages are treated during install operations. Can either be"best"(the default) for the depsolver to prefer packages which best match the systemβs architecture, or"all"to install packages for all available architectures. slay. πobsoletesboolean β this option only has affect during an install/update. It enables dnfβs obsoletes processing logic, which means it makes dnf check whether any dependencies of given package are no longer required and removes them. Useful when doing distribution level upgrades. Default is'true'. Command-line option:--obsoletes <#obsoletes-option-label>optional_metadata_typeslist β list of metadata types to be loaded in addition to primary, modules, comps, updateinfo and presto, which are loaded always.
Note that the list can be extended by individual commands to explicitly request loading specific metadata type.
Currently only filelists value is supported. Default is an empty list. πΈ
persistdirstring β directory where DNF stores its persistent data between runs. Default is"/var/lib/dnf". iconic default tbh. πpersistencestring β whether changes should persist across system reboots. Default isauto. Passing--transient <#transient-option-label>will override this setting totransient. 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.github.io/bootc/man/bootc-usr-overlay.html.persist: changes will persist across reboots.
pluginconfpathlist β list of directories that are searched for plugin configurations to load. All configuration files found in these directories, that are named same as a plugin, are parsed. The default path is/etc/dnf/plugins. π§pluginpathlist β list of directories that are searched for plugins to load. Plugins found in any of the directories in this configuration option are used. The default contains a Python version-specific path. iykyk. πpluginsboolean β controls whether the plugins are enabled. Default isTrue. β¨protected_packageslist β list of packages that DNF should never completely remove. They are protected via Obsoletes as well as user/plugin removals.
The default is: dnf, glob:/etc/yum/protected.d/*.conf and glob:/etc/dnf/protected.d/*.conf. So any packages which should be protected can do so by including a file in /etc/dnf/protected.d with their package name in it.
DNF will protect also the package corresponding to the running version of the kernel. See also protect_running_kernel option. no cap. π
protect_running_kernelboolean β controls whether the package corresponding to the running version of kernel is protected from removal. Default isTrue. bestie donβt touch my kernel. πreleaseverstring β used for substitution of$releaseverin the repository configuration.
The $releasever_major and $releasever_minor variables will be automatically derived from $releasever by splitting it on the first .. For example, if $releasever is set to 1.23, then $releasever_major will be 1 and $releasever_minor will be 23.
$releasever_major and $releasever_minor can also be set by the distribution.
See also repo variables. π¦
reposdirlist β DNF searches for repository configuration files in the paths specified byreposdir. The behavior ofreposdircould differ when it is used along with--installrootoption. heads up. πrpmverbositystring β RPM debug scriptlet output level. One of:critical,emergency,error,warn,infoordebug. Default isinfo. vibe check your logs. πstrictboolean β if disabled, all unavailable packages or packages with broken dependencies given to DNF command will be skipped without raising the error causing the whole operation to fail. Currently works for install command only. The default isTrue. careful with that. πtsflagslist β list of strings adding extra flags for the RPM transaction.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_DEPLOOPS
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, gpg keys check (including permanent import of additional keys if necessary), and rpm check to prevent file conflicts. The nocaps is supported with rpm-4.14 or later. When nocaps is used but rpm doesnβt support it, DNF only reports it as an invalid tsflag. π₯
upgrade_group_objects_upgradeboolean β set this toFalseto disable the automatic running of group upgrade when running the upgrade command. Default isTrue(perform the operation). slay. πusr_drift_protected_pathslist β 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, DNF aborts the operation and prints an error. Supports globs. Defaults toglob:/etc/dnf/usr-drift-protected-paths.d/*.conf. So a list of paths can be protected by creating a.conffile in/etc/dnf/usr-drift-protected-paths.d/containing one path (or glob pattern) per line.
When using persistence=transient on bootc systems, a transient overlay is created on /usr, and any changes DNF 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. drama. π
varsdirlist β list of directories where variables definition files are looked for. Defaults to"/etc/dnf/vars","/etc/yum/vars". See variable files in Configuration reference. πΈzchunkboolean β enables or disables the use of repository metadata compressed using the zchunk format (if available). Default isTrue. β¨
π¨ COLORS β the glow-up settings β¨
okay bestie, this whole chunk is about making your terminal pretty when it lists stuff, and honestly? it's giving rainbow π. Each of these takes a color value.
colorstring β decides whether DNF does colored output on the command line at all. The possible values are literally"auto","never","always". Default is"auto". iykyk β¨color_list_available_downgradecolor β the color for available packages that are older than the installed ones. Used during list operations. Default ismagenta. πcolor_list_available_installcolor β the color for packages that are available to install and have none of their versions installed already. Used during list operations. Default isbold,cyan. π©΅color_list_available_reinstallcolor β the color for available packages that are identical to the installed versions and can be reinstalled. Default isbold,underline,green. Used during list operations. πcolor_list_available_upgradecolor β the color for available packages that are newer than the installed packages. Default isbold,blue. Used during list operations. πcolor_list_installed_extracolor β the color for installed packages that have no version at all among the available packages. Used during list operations. Default isbold,red. π₯color_list_installed_newercolor β the color for installed packages that are newer than any version among the available packages. Used during list operations. Default isbold,yellow. βcolor_list_installed_oldercolor β the color for installed packages that are older than any version among the available packages. Used during list operations. Default isyellow. πcolor_list_installed_reinstallcolor β the color for installed packages that are among the available packages and can be reinstalled. Used during list operations. Default iscyan. π©΅color_search_matchcolor β the color of the patterns that matched in search output. Default isbold,magenta. πcolor_update_installedcolor β the color of removed packages. Default isred. This one is used while displaying transactions. π¨color_update_localcolor β the color of local packages that are installed from the@commandlinerepository. Used while displaying transactions. Default isgreen. πΏcolor_update_remotecolor β the color of packages that are installed / upgraded / downgraded from remote repositories. Used while displaying transactions. Default isbold,green. π
π¦ REPO OPTIONS π¦
These are the per-repository settings, bestie. Every single one, no skips. π
baseurllist β list of URLs for the repository. Defaults to[].
The URLs get tried in the order you list them β which is equivalent to yum's "failovermethod=priority" behavior. π«Ά
costinteger β the relative cost of accessing this repository, defaulting to1000. This value gets compared when the priorities of two repositories are the same, and the repo with the lowest cost is the one that gets picked. It's useful for making the library prefer on-disk repositories over remote ones. β¨enabledboolean β include this repository as a package source. Default isTrue. πgpgkeylist of strings β URLs of GPG key files that can be used for signing the metadata and packages of this repository. Empty by default. If a file can't be verified using the keys that are already imported, then DNF attempts to import keys from this option and then uses those keys for verification. πmetalinkstring β URL of a metalink for the repository. Defaults toNone. π°οΈmirrorliststring β URL of a mirrorlist for the repository. Defaults toNone. πͺmodule_hotfixesboolean β set this toTrueto disable module RPM filtering and make all RPMs from the repository available. Default isFalse. This lets a user create a repository with cherry-picked hotfixes that are included in a package set on a modular system. πnamestring β a human-readable name for the repository. Defaults to the ID of the repository. π·οΈpriorityinteger β the priority value of this repository, default is99. If there's more than one candidate package for a particular operation, the one from the repo with the lowest priority value gets picked β possibly even if it's less convenient otherwise (like, say, being a lower version). π¬typestring β type of repository metadata. Supported values are:rpm-md. Aliases forrpm-md:rpm,repomd,rpmmd,yum,YUM. ποΈ
π SOURCE AND DEBUGINFO REPOSITORY NAMES π
So here's the naming tea β for a repo whose identifier looks like <ID>-rpms:
- its corresponding source repository is expected to have an identifier in the form
<ID>-source-rpms - its debuginfo repository is expected to have an identifier in the form
<ID>-debug-rpms
Otherwise β meaning if the repository identifier does not have the -rpms suffix:
- the source repository is expected to have an identifier in the form
<ID>-source - the debuginfo repository is expected to have an identifier in the form
<ID>-debuginfo
fr fr, examples make it click:
- for repository
fedora, the source repository isfedora-sourceand the debuginfo repository isfedora-debuginfo - for repository
fedora-rpms, the source repository isfedora-source-rpmsand the debuginfo repository isfedora-debug-rpms
π§ REPO VARIABLES π§
The right side of every repo option can be enriched by the following variables, bestie. Lowkey magic. β¨
$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 the operating system, which DNF derives from information available in RPMDB. π$releasever_majorβ the major version of$releasever, i.e. the component of$releaseverthat occurs before the first.. π’$releasever_minorβ the minor version of$releasever, i.e. the component of$releaseverthat occurs after the first.. π’
On top of these hard-coded variables, you can also use user-defined ones π«Ά. You can define them 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 a variable in your repository configuration, remove the prefix. E.g.:
[myrepo]
baseurl=https://example.site/pub/fedora/$MY_VARIABLE/releases/$releasever
β οΈ heads up bestie: 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
A limited form of shell-like parameter expansion is supported for variables. π
${my_variable:-word}β ifmy_variableis unset or empty, thenwordwill be substituted. Otherwise, the value ofmy_variablewill be substituted.${my_variable:+word}β ifmy_variableis set and not empty, thenwordwill be substituted. Otherwise, the empty string will be substituted.
Parameter expansions can be nested up to a maximum depth of 32. For example:
${my_defined_variable:+${my_undefined_variable:-foobar}}
will evaluate to foobar. iconic, honestly π
π OPTIONS FOR BOTH [MAIN] AND REPO π
Some options can be applied in the main section, per repository, or in a combination. The value you give in the main section is used for all repositories as the default value, which repositories can then override in their own configuration. main character energy, truly π
bandwidthstorage size β total bandwidth available for downloading. Meaningful when it's used with thethrottleoption. The storage size is in bytes by default, but you can specify it with a unit of storage. The valid units are'k','M','G'. πcountmeboolean β when it's 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 lets the repository provider 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, because of short DHCP leases and NAT, respectively). π§
And no, this is not an out-of-band HTTP request made for this purpose alone. Only requests initiated by DNF during normal operation β like checking 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 figure out when a system was installed (that's the "epoch", bestie π«), the modification time of the machine-id(5) file is the single source of truth. That file is semantically tied to the system's whole lifetime, bc it usually gets written at installation time β or on the very first boot by an installer tool or init system (like systemd(1)) β and then it just stays there, unchanged, iconic behavior honestly.
If that file is empty or missing (hi, containers π), then the epoch is declared as the time of the very first request made using the expanded metalink URL that carried the flag. "Expanded" meaning any repository variables like $releasever are already substituted in, iykyk.
And if this repo has no metalink URL defined but does have a mirrorlist URL? Then the mirrorlist URL is used for this purpose instead. Slay.
Default is False.
deltarpm(boolean) β turn this on and DNF saves bandwidth by downloading way smaller delta RPM files and rebuilding them into real RPMs locally. Downside? It's super CPU- and I/O-intensive, no cap. Default is False. Heads up: it needs/usr/bin/applydeltarpmpresent on the system.deltarpm_percentage(integer) β when the relative size of the delta vs the pkg is bigger than this number, the delta just doesn't get used. Default value is 75 (so deltas have to be at least 25% smaller than the pkg, got it?). Set it to 0 to turn off delta rpm processing entirely. Oh and local repositories (the ones with a<file://>baseurl) have delta rpms turned off by default already.enablegroups(boolean) β decides whether DNF will allow package groups for this repository. Default is True (package groups are allowed π).excludepkgs(list) β excludes packages from this repository β by name or by glob, comma-separated β from all operations. Can be disabled with the--disableexcludescommand line switch. Defaults to[].fastestmirror(boolean) β if enabled, TCP socket latency is used to find the closest available mirror. Then a mirror gets selected at random, but only from the ones with less than twice the lowest latency β for load balancing purposes, obvs. Warning bestie: this overrides the order provided by the mirrorlist/metalink file itself, and it does not consider mirrorlist parameters like mirror bandwidth or preferred mirrors for client IP addresses.gpgcheck(boolean) β whether to perform a GPG signature check on packages found in this repository. The default is False.
Careful with this one: this option can only be used to strengthen the active RPM security policy set with the %_pkgverify_level macro (peep the /usr/lib/rpm/macros file for the deets). What that means is β if the macro is set to 'signature' or 'all' and this option is False, it gets overridden to True during DNF runtime, and a warning gets printed. Wanna squelch that warning? Make sure this option is True for every enabled repository, and also enable localpkg_gpgcheck.
includepkgs(list) β includes packages of this repository, by name or glob, comma-separated, in all operations. It's the inverse ofexcludepkgsβ DNF will exclude any package in the repo that doesn't match this list. It works together withexcludepkgsand does not override it, so if you've gotexcludepkgs=*.i386andincludepkgs=python*, then only packages starting withpythonthat do not have an i386 arch will be seen by DNF in this repo. Iconic filter logic ngl. Can be disabled with the--disableexcludescommand line switch. Defaults to[].ip_resolve(IP address type) β determines how DNF resolves host names. Set it to'4'/'IPv4'or'6'/'IPv6'to resolve to IPv4 or IPv6 addresses only. By default, DNF resolves to either kind of address.localpkg_gpgcheck(boolean) β whether to perform a GPG signature check on local packages (packages sitting in a file, not in a repository). The default is False. This option is subject to the active RPM security policy (check outgpgcheckabove for more details π).max_parallel_downloads(integer) β max number of simultaneous package downloads. Defaults to 3. Maximum is 20. Don't get greedy.metadata_expire(time in seconds) β the period after which the remote repository gets checked for a metadata update, and if there is one the local metadata cache gets updated too. The default corresponds to 48 hours. Set this to-1orneverto make the repo never be considered expired. Expiry of metadata can also be triggered by a change of timestamp of configuration files (dnf.conf,<repo>.repo). See alsocheck_config_file_age.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, DNF aborts the connection. The default is 1000. Valid units are'k','M','G'.password(string) β the password to use for connecting to a repository with basic HTTP authentication. Empty by default. πproxy(string) β URL of a proxy server to connect through. Set it 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]. (And for backward compatibility,'_none_'can be used instead of the empty string, bestie.)
Note: the curl environment variables (like 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. Empty by default.proxy_password(string) β the password to use for connecting to the proxy server. Empty by default.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
Defaults to any.
proxy_sslcacert(string) β path to the file containing the certificate authorities used to verify proxy SSL certificates. Empty by default β uses the system default.proxy_sslverify(boolean) β when enabled, proxy SSL certificates are verified. If the client can't be authenticated, connecting fails and the repository is not used any further. If False, SSL connections can still be used, but certificates are not verified (spicy, be careful πΆοΈ). Default is True.proxy_sslclientcert(string) β path to the SSL client certificate used to connect to the proxy server. Empty by default.proxy_sslclientkey(string) β path to the SSL client key used to connect to the proxy server. Empty by default.repo_gpgcheck(boolean) β whether to perform a GPG signature check on this repository's metadata. The default is False. Important thing to know: the GPG keys for this check are stored separately from the GPG keys used in package signature verification. And on top of that, they're also stored separately for each repository.
Which means dnf might ask you to import the same key multiple times, bestie π. For example, if a key was already imported for package signature verification and this option gets turned on, it may be needed to import it again for the repository.
retries(integer) β sets the number of total retries for downloading packages. The number is accumulative, so like, forretries=10, dnf will fail after any package download fails for the eleventh time. Setting this to 0 makes dnf try forever. Default is 10.skip_if_unavailable(boolean) β if enabled, DNF will keep running and just disable the repository that couldn't be synchronized for any reason. This option does not affect skipping of unavailable packages after dependency resolution. Wanna check whether a repository is inaccessible? Use it in combination with therefreshcommand line option <# refresh-command-label>. The default is False. Note that this option in particular can be set in your configuration file by your distribution.sslcacert(string) βsslcacertpath(string) β Path to the file containing the certificate authorities to verify SSL certificates. Empty by default - uses system default.sslverify(boolean) β When enabled, remote SSL certificates are verified. If the client can not be authenticated, connecting fails and the repository is not used any further. If False, SSL connections can be used, but certificates are not verified. Default is True.sslverifystatus(boolean) β When enabled, revocation status of the server certificate is verified using the "Certificate Status Request" TLS extension (aka. OCSP stapling). Default is False.sslclientcert(string) β Path to the SSL client certificate used to connect to remote sites. Empty by default.sslclientkey(string) β Path to the SSL client key used to connect to remote sites. Empty by default.throttle(storage size) β Limits the downloading speed. It might be an absolute value or a percentage, relative to the value of thebandwidthoption option.0means no throttling (the default). The absolute value is in bytes by default but can be specified with a unit of storage. Valid units are'k','M','G'.timeout(time in seconds) β Number of seconds to wait for a connection before timing out. Used in combination withminrateoption option. Defaults to30seconds.username(string) β The username to use for connecting to repo with basic HTTP authentication. Empty by default.user_agent(string) β The User-Agent string to include in HTTP requests sent by DNF. Defaults to
libdnf (NAME VERSION_ID; VARIANT_ID; OS.BASEARCH)
where NAME, VERSION_ID and VARIANT_ID are OS identifiers read from the os-release(5) file, and OS and BASEARCH are the canonical OS name and base architecture, respectively. Example:
libdnf (Fedora 31; server; Linux.x86_64)
β¨ TYPES OF OPTIONS β¨
booleanβ This is a data type with only two possible values. One of following options can be used:1,0,True,False,yes,nointegerβ It is a whole number that can be written without a fractional component.listβ It is an option that could represent one or more strings separated by space or comma characters.stringβ It is a sequence of symbols or digits without any whitespace character.colorβ A string describing color and modifiers separated with a comma, for example"red,bold".- Colors:
black,blue,cyan,green,magenta,red,white,yellow - Modifiers:
bold,blink,dim,normal,reverse,underline
- Colors:
π FILES π
- Cache Files β
/var/cache/dnf - Main Configuration File β
/etc/dnf/dnf.conf - Repository β
/etc/yum.repos.d/ - Variables β Any properly 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.
π¦ SEE ALSO π¦
dnf(8), DNF Command Reference <#command-ref-label>
π«Ά Author π«Ά
See AUTHORS in DNF source distribution.
π Copyright π
2012-2020, Red Hat, Licensed under GPLv2+
That's the vibe check for DNF4.CONF(5) β version 4.24.0, dated Feb 19, 2026. Stay slay, bestie! π«Άπβ¨
π¦ where this page comes from
- ubuntu resolute: dnf-data 4.24.0-1build1 Β· GPL-2.0-or-later
- ubuntu stonking: dnf-data 4.24.0-1build1 Β· 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