DNF4.CONF(5)
๐ฆ dnf4.conf โ DNF Configuration Reference โ DNF4.CONF(5) ๐ฆ
๐ NAME ๐
dnf4.conf โ DNF Configuration Reference. That's the whole vibe, bestie.
๐ธ DESCRIPTION ๐ธ
By default, DNF uses the global configuration file at /etc/dnf/dnf.conf plus every *.repo file it finds under /etc/yum.repos.d. Those *.repo files are usually where repository configuration lives, and they take precedence over the global configuration.
The config file is INI format: you get a section declaration, then name=value options under it, each on a separate line. There are two types of sections in these config files: main and repository. The main section defines all global configuration options, and there should be only one.
Repository sections define the configuration for each remote or local repository. The bracketed section name is the repo ID reference and needs to be unique across configuration files. Repo IDs can use lower and upper case alphabetic letters, digits, -, _, ., and :. Aside from the repo ID, a minimal repository configuration file should consist of a baseurl, metalink, or mirrorlist option definition.
๐ DISTRIBUTION-SPECIFIC CONFIGURATION ๐
Your distribution can set these configuration options in the DNF configuration file to override the DNF defaults: best and skip_if_unavailable. Periodt.
โจ [MAIN] OPTIONS โจ
allow_vendor_change(boolean) โ When disabled, dnf sticks to the vendor while upgrading or downgrading rpms. Default isFalse.
โ ๏ธ WARNING: This option is currently not supported fordowngradeanddistro-synccommands.
arch(string) โ The architecture used for installing packages. By default this is auto-detected. Often used together with theignorearchoption.assumeno(boolean) โ If enabled, dnf assumes No where it would normally prompt for confirmation from user input. Default isFalse.assumeyes(boolean) โ If enabled, dnf assumes Yes where it would normally prompt for confirmation from user input (see alsodefaultyes). Default isFalse.autocheck_running_kernel(boolean) โ Automatic check whether there is an installed newer kernel module with a security update than the currently running kernel. Default isTrue.basearch(string) โ The base architecture used for installing packages. By default this is auto-detected.best(boolean) โTrueinstructs the solver to either use a package with the highest available version or fail. OnFalse, do not fail if the latest version cannot be installed and go with the lower version. The default isFalse. Note that this option in particular can be set in your configuration file by your distribution. Also note that the use of the highest available version is only guaranteed for the packages directly requested and not for their dependencies.cachedir(string) โ Path to a directory used by various DNF subsystems for storing cache data. Has a reasonable root-writable default depending on the distribution. DNF needs to be able to create files and directories at this location.cacheonly(boolean) โ If set toTrue, DNF will run entirely from system cache, will not update the cache, and will use it even in case it is 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.
check_config_file_age(boolean) โ Specifies whether dnf should automatically expire metadata of repos which are older than their corresponding configuration file (usually thednf.conffile and thefoo.repofile). Default isTrue(perform the check). Expire of metadata is also affected by metadata age. See alsometadata_expire.clean_requirements_on_remove(boolean) โ 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 was pulled in as a dependency. The default isTrue. (installonlypkgsare never automatically removed.)config_file_path(string) โ Path to the default main configuration file. Default is/etc/dnf/dnf.conf.debuglevel(integer) โ Debug messages output level, in the range 0 to 10. The higher the number, the more debug output is put to stdout. Default is2.debug_solver(boolean) โ Controls whether the libsolv debug files should be created when solving the transaction. The debug files are created in the./debugdatadirectory. Default isFalse.defaultyes(boolean) โ If enabled, the default answer to user confirmation prompts will be Yes. Not to be confused withassumeyes, which will not prompt at all. Default isFalse.diskspacecheck(boolean) โ Controls whether rpm should check available disk space during the transaction. Default isTrue.errorlevel(integer) โ Error messages output level, in the range 0 to 10. The higher the number, the more error output is put to stderr. Default is3. This is deprecated in DNF and overwritten by the--verbosecommandline option.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, 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.exit_on_lock(boolean) โ Should the dnf client exit immediately when something else has the lock? Default isFalse.gpgkey_dns_verification(boolean) โ 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. 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 whose NON-existence is cryptographically proven using DNSSEC. This is mainly to preserve backward compatibility. Default isFalse.group_package_types(list) โ List of the following:optional,default,mandatory. Tells dnf which type of packages in groups will be installed when'groupinstall'is called. Default is:default,mandatory.ignorearch(boolean) โ If set toTrue, RPM will allow attempts to install packages incompatible with the CPU's architecture. Defaults toFalse. Often used together with thearchoption.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 bydnf autoremoveeven if they were installed as dependencies (seeclean_requirements_on_removefor 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_limit(integer) โ 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 protection of the running kernel from removal.installroot(string) โ The root of the filesystem for all packaging operations. It requires an absolute path. See also--installrootcommandline option.install_weak_deps(boolean) โ 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.keepcache(boolean) โ Keeps downloaded packages in the cache when set toTrue. Even if it is set toFalseand packages have not been installed, they will still persist until the next successful transaction. The default isFalse.logdir(string) โ Directory where the log files will be stored. Default is/var/log.logfilelevel(integer) โ Log file messages output level, in the range 0 to 10. The higher the number, the more debug output is put to logs. Default is9. This option controlsdnf.log,dnf.librepo.log, andhawkey.log. Althoughdnf.librepo.logandhawkey.logare affected only by setting thelogfilelevelto10.log_compress(boolean) โ When set toTrue, log files are compressed when they are rotated. Default isFalse.log_rotate(integer) โ Log files are rotatedlog_rotatetimes before being removed. Iflog_rotateis0, the rotation is not performed. Default is4.log_size(storage size) โ Log files are rotated when they grow bigger thanlog_sizebytes. Iflog_sizeis0, the rotation is not performed. The default is 1 MB. Valid units are'k','M', and'G'. The size applies for individual log files, not the sum of all log files. See alsolog_rotate.metadata_timer_sync(time in seconds) โ type:time in seconds.
โฆand okay, back to that timer situation from before (you know the one ๐
): it's the minimal period between two consecutive makecache timer runs. The command will stop immediately if it's been less than this time period since its last run. It does not affect a plain simple makecache run, bestie. Use 0 to completely disable automatic metadata synchronizing. The default corresponds to three hours. The value is rounded to the next commenced hour. โฐ
module_obsoletesโ boolean. Controls whether dnf should apply modular obsoletes when possible. Default isFalse.module_platform_idโ string. Set this to$name:$streamto override thePLATFORM_IDdetected from/etc/os-release. It is necessary to perform a system upgrade and switch to a new platform. ๐module_stream_switchโ boolean. This option controls whether it's possible to switch enabled streams of a module. Default isFalse.multilib_policyโ string. 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. Choose your fighter ๐ฅobsoletesโ boolean. 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
optional_metadata_typesโ list. List of metadata types to be loaded in addition toprimary,modules,comps,updateinfoandpresto, 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.
persistdirโ string. Directory where DNF stores its persistent data between runs. Default is"/usr/lib/sysimage/dnf". ๐๏ธpersistenceโ string. Whether changes should persist across system reboots. Default isauto. Passing--transientwill 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://containers.github.io/bootc/man/bootc-usr-overlay.html. ๐ซฃpersist: Changes will persist across reboots.
pluginconfpathโ list. 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.pluginpathโ list. 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. ๐pluginsโ boolean. Controls whether the plugins are enabled. Default isTrue.protected_packagesโ list. 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.
protect_running_kernelโ boolean. Controls whether the package corresponding to the running version of kernel is protected from removal. Default isTrue. Don't you dare delete the kernel you're literally running on ๐ญreleaseverโ string. 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.
reposdirโ list. DNF searches for repository configuration files in the paths specified byreposdir. The behavior ofreposdircould differ when it is used along with--installrootoption.rpmverbosityโ string. RPM debug scriptlet output level. One of:critical,emergency,error,warn,infoordebug. Default isinfo. ๐ขstrictโ boolean. 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 forinstallcommand only. The default isTrue. Soft girl mode =False๐tsflagsโ list. List of strings adding extra flags for the RPM transaction. Here's the whole mapping, no cap: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_upgradeโ boolean. Set this toFalseto disable the automatic running of group upgrade when running theupgradecommand. Default isTrue(perform the operation).varsdirโ list. List of directories where variables definition files are looked for. Defaults to"/etc/dnf/vars","/etc/yum/vars". See variable files in Configuration reference. ๐zchunkโ boolean. Enables or disables the use of repository metadata compressed using the zchunk format (if available). Default isTrue. Compression slay ๐
๐จ [MAIN] OPTIONS - COLORS ๐จ
okay bestie, this is the glow-up section โจ โ all the little knobs that decide what your terminal looks like when DNF does its thing.
colorstring โ controls whether DNF uses colored output on the command line. possible values:"auto","never","always". default is"auto". ๐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 for installation and have none of their versions installed. 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 ones. default isbold,blue. used during list operations. ๐color_list_installed_extracolor โ the color for installed packages that don't have any version 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 matched in search output. default isbold,magenta. ๐color_update_installedcolor โ the color of removed packages. default isred. this option gets used when displaying transactions. ๐color_update_localcolor โ the color of local packages that are installed from the@commandlinerepository. this option gets used when displaying transactions. default isgreen. ๐color_update_remotecolor โ the color of packages that are installed/upgraded/downgraded from remote repositories. this option gets used when displaying transactions. default isbold,green. ๐
๐ฆ REPO OPTIONS ๐ฆ
this is where you actually tell DNF where stuff lives. one of these per repo, bestie. ๐ซถ
baseurllist โ list of URLs for the repository. defaults to[].
URLs are tried in the listed order (that's equivalent to yum's "failovermethod=priority" behaviour). ๐ฏ
costinteger โ the relative cost of accessing this repository, defaulting to1000. this value gets compared when the priorities of two repositories are the same. the repo with the lowest cost 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 metadata and packages of this repository, empty by default. if a file can't be verified using the already imported keys, DNF attempts to import keys from this option, and then those keys get used 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 the user create a repository with cherry-picked hotfixes that are included in a package set on a modular system. ๐namestring โ a human-readable name of 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 a repo with the lowest priority value gets picked โ possibly despite being less convenient otherwise (like, say, being a lower version). ๐ญtypestring โ type of repository metadata. supported values are:rpm-md. aliases for rpm-md:rpm,repomd,rpmmd,yum,YUM. ๐ท๏ธ
๐งฌ SOURCE AND DEBUGINFO REPOSITORY NAMES ๐งฌ
ok so the naming here is iconic once you see the pattern, i promise. ๐
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 its debuginfo repository an identifier in the form "<ID>-debug-rpms".
otherwise (so, 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 the debuginfo repository an identifier in the form "<ID>-debuginfo".
for example, for repository "fedora", the source repository is "fedora-source" and the debuginfo repository is "fedora-debuginfo". for repository "fedora-rpms", the source repository is "fedora-source-rpms" and the debuginfo repository is "fedora-debug-rpms". see? pattern. slay. ๐
๐ฎ REPO VARIABLES ๐ฎ
the right side of every repo option can be enriched by the following variables โ this is where config gets flexible:
$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โ major version of$releasever, i.e. the component of$releaseveroccurring before the first.. ๐ฏ$releasever_minorโ minor version of$releasever, i.e. the component of$releaseveroccurring after the first.. โจ
in addition to these hard coded variables, user-defined ones can also be used. 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
โ ๏ธ note that it is not possible to override thearchandbasearchvariables using either variable files or environmental variables. those two are locked in, bestie. ๐
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. iykyk. ๐
๐ช 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 own configuration. main character energy from [main], but the repos still get to have opinions. ๐
bandwidthstorage size โ total bandwidth available for downloading. meaningful when used with thethrottleoption. storage size is in bytes by default but can be specified with a unit of storage. valid units are'k','M','G'. ๐ฆcountmeboolean โ when enabled, one (and only one) HTTP GET request for the metalink file gets 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 โ 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โ first week - bucket
2โ first month (2 - 4 weeks) - bucket
3โ first 6 months (5 - 24 weeks) - bucket
4โ 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. ๐ฐ๏ธ
okay so picking up the epoch thread, bestie: to figure out 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, since 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 it stays unchanged.
If that file is empty or missing (container girlies, I see you ๐), then 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 is False.
deltarpmโ boolean. When enabled, DNF saves bandwidth by downloading much smaller delta RPM files and rebuilding them to RPM locally. However, this is quite CPU and I/O intensive ๐ญ. Default isFalse. It requires/usr/bin/applydeltarpmon the system.deltarpm_percentageโ integer. When the relative size of delta vs pkg is larger than this, delta is not used. Default value is75(deltas must be at least 25% smaller than the pkg). Use0to turn off delta rpm processing. Local repositories (withfile://baseurl) have delta rpms turned off by default.enablegroupsโ boolean. Determines whether DNF will allow the use of package groups for this repository. Default isTrue(package groups are allowed) ๐ซถ.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 using--disableexcludescommand line switch. Defaults to[].fastestmirrorโ boolean. If enabled, 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.gpgcheckโ boolean. Whether to perform GPG signature check on packages found in this repository. The default isFalse.
This option can only be used to strengthen the active RPM security policy set with the %_pkgverify_level macro (see the /usr/lib/rpm/macros file for details). That means, if the macro is set to 'signature' or 'all' and this option is False, it will be overridden to True during DNF runtime, and a warning will be printed. To squelch the warning, make sure this option is True for every enabled repository, and also enable localpkg_gpgcheck.
includepkgsโ list. Include packages of this repository, specified by a name or a glob and separated by a comma, in all operations. Inverse ofexcludepkgs: DNF will exclude any package in the repository that doesn't match this list. This works in conjunction withexcludepkgsand doesn't override it, so if you'excludepkgs=*.i386'and'includepkgs=python*'then only packages starting withpythonthat do not have an i386 arch will be seen by DNF in this repo. Can be disabled using--disableexcludescommand line switch. Defaults to[].ip_resolveโ IP address type. Determines how DNF resolves host names. Set this to'4'/'IPv4'or'6'/'IPv6'to resolve to IPv4 or IPv6 addresses only. By default, DNF resolves to either addresses.localpkg_gpgcheckโ boolean. Whether to perform a GPG signature check on local packages (packages in a file, not in a repository). The default isFalse. This option is subject to the active RPM security policy (seegpgcheckfor more details).max_parallel_downloadsโ integer. Maximum number of simultaneous package downloads. Defaults to3. Maximum of20๐ฅ.metadata_expireโ time in seconds. The period after which the remote repository is checked for metadata update and in the positive case the local metadata cache is updated. The default corresponds to 48 hours. Set this to-1orneverto make the repo never considered expired. Expire of metadata can be also triggered by change of timestamp of configuration files (dnf.conf,<repo>.repo). See alsocheck_config_file_age.minrateโ storage size. This 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 is1000. 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 to an empty string in the repository configuration to disable 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.)
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. 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 to verify proxy SSL certificates. Empty by default โ uses system default.proxy_sslverifyโ boolean. When 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 isTrue.proxy_sslclientcertโ string. Path to the SSL client certificate used to connect to proxy server. Empty by default.proxy_sslclientkeyโ string. Path to the SSL client key used to connect to proxy server. Empty by default.repo_gpgcheckโ boolean. Whether to perform GPG signature check on this repository's metadata. The default isFalse. Note that GPG keys for this check are stored separately from GPG keys used in package signature verification. Furthermore, they are also stored separately for each repository.
This means that dnf 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.
retriesโ integer. Set the number of total retries for downloading packages. The number is accumulative, so e.g. forretries=10, dnf will fail after any package download fails for the eleventh time. Setting this to0makes dnf try forever. Default is10.skip_if_unavailableโ boolean. If enabled, DNF 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 withrefreshcommand line option. The default isFalse. Note this option in particular can be set in your configuration file by your distribution.sslcacertโ 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. IfFalse, SSL connections can be used, but certificates are not verified. Default isTrue. ๐sslverifystatusโ boolean. When enabled, the revocation status of the server certificate is verified using the"Certificate Status Request"TLS extension (aka. OCSP stapling). Default isFalse.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, bestie. 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,no.integerโ 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/vars is 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/vars for YUM compatibility reasons. ๐ซถ
๐ SEE ALSO ๐
dnf(8), DNF Command Reference โ go peek, bestie. ๐
๐ AUTHOR ๐
See AUTHORS in DNF source distribution.
๐ COPYRIGHT ๐
2012-2020, Red Hat, Licensed under GPLv2+.
thatโs the whole page, bestie ๐ซถ this lil manpage is from DNF4.CONF(5), version 4.23.0, dated Mar 19, 2025 โ go configure with main character energy ๐
โจ
๐ฆ where this page comes from
- opensuse-leap 16.0: dnf-data 4.23.0-bp160.1.7 ยท GPL-2.0-only AND GPL-2.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms