DNF5-CONFIG-MANAGER(8)
β¨ dnf5-config-manager(8) β Config-manager Command β¨
πΈ NAME πΈ
dnf5-config-manager - Config-manager Command, from the dnf5 manual set. Bestie, this is the page for the command that handles your config situation. π
π SYNOPSIS π
dnf5 config-manager <subcommand> [options] [arguments]
π¦ DESCRIPTION π¦
Okay so this command is your main-character config bouncer: it manages main configuration, repositories configuration, and variables. Periodt. β¨
π οΈ SUBCOMMANDS π οΈ
π addrepo β from repofile π
addrepo --from-repofile=REPO_CONFIGURATION_FILE_URL
[--create-missing-dir] [--overwrite] [--save-filename=FILENAME]
Adds a new repositories configuration file specified by URL or local path.
The file is copied without changes β no editing, no touching up, just copy-paste energy. π
The destination file name can be defined using the --save-filename option, otherwise it is taken from the source specification. If the .repo extension is missing from the destination filename, it will be added.
The destination directory path is the first path stored in the reposdir option (by default /etc/yum.repos.d). Overwriting/replacing an existing file can be enabled using the --overwrite option. Before the new repositories configuration file is finally saved, it is analyzed and tested for validity. Repository IDs are also tested. Repositories with the same ID must not be defined in other configuration files.
π addrepo β from user options π
addrepo [--id=REPO_ID] <--set=REPO_OPTION=VALUE>+ [--add-or-replace]
[--create-missing-dir] [--overwrite] [--save-filename=FILENAME]
Adds a new repository defined using user options.
At least one of --set=baseurl=<URL>, --set=mirrorlist=<URL>, --set=metalink=<URL> must be set to a non-empty URL. That is non-negotiable. The repository ID can be defined using the --id option, otherwise it is generated from the URL. The destination file name can be defined using the --save-filename option, otherwise it is set to the repository ID. If the .repo extension is missing from the destination filename, it will be added.
The destination directory path is the first path stored in the reposdir option (by default /etc/yum.repos.d). Overwriting/replacing an existing file can be enabled using the --overwrite option. Modifying an existing file can be enabled using the --add-or-replace option. Modification means that the new repository is added to the existing file or a repository with the same ID is replaced in the file. Before the new repository configuration is finally saved, the repository ID is tested. A repository with the same ID must not be defined in another configuration file.
π setopt π
setopt [--create-missing-dir] <[repoid.]option_name=value>+
Sets options in the main configuration file and in the repositories configuration override file.
The main configuration is read first from the files in the drop-in directories and then from the main configuration file (by default /etc/dnf/dnf.conf). So, options from the main configuration file are read last and override the values of the same options defined in the drop-in directories.
The repositories configuration is read from the repository configuration files and then adjusted using repository configuration overrides. Repository configuration override files are read from the distribution repository override directory (/usr/share/dnf5/repos.override.d) and from the system repository override directory (/etc/dnf/repos.override.d). If a file with the same name is present in both override directories, only the file from the system override directory is used. Thus, the distribution override file can simply be masked by creating a file with the same name in the system override directory. All used override files are sorted alphabetically by their names and then applied in that order. The override from the next file overwrites the previous one β the last override wins. π
The setopt command writes the repositories configuration overrides to a file named 99-config_manager.repo located in the system repository override directory. Repository settings are written only to this override file. The original repository configuration file is not changed. Repository ID may contain globs. Override files also support globs. But the setopt command resolves the repoid pattern, and overrides are set for each matching repository independently. This means repositories added later will not be affected by these overrides.
π unsetopt π
unsetopt <[repoid.]option_name>+
Removes options from the main configuration file and from the repositories configuration override file.
The unsetopt command removes options from the main configuration file (by default /etc/dnf/dnf.conf). However, the options may be still defined in configuration files in drop-in directories (for example, the default distribution configuration).
The unsetopt command removes repository configuration overrides from the file named 99-config_manager.repo located in the system repository override directory. However, the overrides may be still defined in other repository override files (for example, the default distribution overrides). Empty sections are removed from the configuration override file. Repository ID may contain globs. In this case, the repoid pattern is resolved and the override is removed from all matching sections.
π setvar π
setvar [--create-missing-dir] <variable_name=value>+
Sets one or more variables.
Variables are loaded from multiple directories. The list of directory paths is taken from the varsdir option. The setvar command stores variables to the last directory in the list (by default /etc/dnf/vars). Variables from this directory are read last and override the values of the same variables defined in previous directories. In other words, the last directory has the highest priority. π
π Note: The variablesreleasever_majorandreleasever_minorare automatically derived from thereleasevervariable whenever it is set.
π unsetvar π
unsetvar <variable>+
Removes variables.
Variables are loaded from multiple directories. The list of directory paths is taken from the varsdir option. The unsetvar command removes variables from the last directory in the list (by default /etc/dnf/vars). So, the variable may still exist in another directory in the list (for example, the default distribution value).
π enable π
enable [--create-missing-dir] <repoid>+
Enables one or more repositories.
The enable command enables the repositories via a file named 99-config_manager.repo located in the system repository override directory. The original repository configuration file is not changed. Repository ID may contain globs. enable command resolves the repoid pattern, and each matching repository is enabled independently. This means repositories added later will not be affected by this command.
π disable π
disable [--create-missing-dir] <repoid>+
Disables one or more repositories.
The disable command disables the repositories via a file named 99-config_manager.repo located in the system repository override directory. The original repository configuration file is not changed. Repository ID may contain globs. disable command resolves the repoid pattern, and each matching repository is disabled independently. This means repositories added later will not be affected by this command.
π‘ Note: Override directories are also listed with examples in Drop-in repo directories <#drop-in-repo-directories-label>.
π OPTIONS π
--add-or-replaceβ Allow adding or replacing the repository with the same ID in the existing configuration file.--create-missing-dirβ Allow creation of missing directories. ποΈ--from-repofile=REPO_CONFIGURATION_FILE_URLβ Specifies the source configuration file with the new repositories.--id=REPO_IDβ Set ID for newly created repository.--overwriteβ Allow replacing the existing repository configuration file by new one.--save-filename=FILENAMEβ Set the name of the new repository configuration file. The.repoextension is added if it is missing.--set=REPO_OPTION=VALUEβ Set option in newly created repository.
π EXAMPLES π
π« addrepo from a repofile
dnf5 config-manager addrepo --from-repofile=http://example.com/some/additional.repo
Download additional.repo, test it, and put it in repository configuration directory.
π« addrepo with baseurl
dnf5 config-manager addrepo --set=baseurl=http://example.com/different/repo
Create new repo file with http://example.com/different/repo as baseurl and enable it. The repository ID and target file name is generated from baseurl.
π« addrepo with id and disabled
dnf5 config-manager addrepo --set=baseurl=http://example.com/different/rep --id=example --set=enabled=0
Create new repo file with http://example.com/different/repo as baseurl. Set repository ID to example and disable it.
π« setopt enable and disable
dnf5 config-manager setopt repoid1.enabled=1 repoid2.enabled=0
Sets override to enable repository identified by repoid1 and disable repository identified by repoid2.
π« setopt proxy for two repos
dnf5 config-manager setopt repo1.proxy=http://proxy.example.com:3128/ repo2.proxy=http://proxy.example.com:3128/
Sets override for proxy option in repositories with repository IDs repo1 and repo2.
π« setopt with a glob
dnf5 config-manager setopt '*-debuginfo.pkg_gpgcheck=0'
Sets override for the pkg_gpgcheck option in all repositories whose repository ID ends with -debuginfo.
π« unsetopt with a glob
dnf5 config-manager unsetopt '*-debuginfo.pkg_gpgcheck'
Remove override for the pkg_gpgcheck option in all repositories whose repository ID ends with -debuginfo.
π« setopt main options
dnf5 config-manager setopt keepcache=1 log_size=10M
Enables the keepcache main option and sets the maximum size of logger files to 10 mebibytes (10 * 1024 * 1024 bytes).
π« unsetopt main options
dnf5 config-manager unsetopt keepcache log_size
Removes keepcache and log_size from the main configuration file.
π« setvar with directory creation
dnf5 config-manager setvar --create-missing-dir myvar1=value1 myvar2=value2
Sets the variables myvar1 and myvar2. Directory for the variables is created if it does not exist.
π« unsetvar
dnf5 config-manager unsetvar myvar1 myvar2
Removes myvar1 and myvar2 variables.
π SEE ALSO π
Configuration: dnf5.conf(5), DNF5 Configuration Reference <#dnf5-conf-label>
π«Ά Author π«Ά
See AUTHORS.md in dnf5 source distribution.
π COPYRIGHT π
Okay bestie, this is the part where we give credit where credit is due π β and no cap, credit matters.
The copyright for this whole thing belongs to the Contributors to the dnf5 project. π«Ά
That's the entire section, and yeah, it's short, but it's giving "respect the collective" energy and honestly? Iconic. Every single one of those contributors showed up, did the work, and now their names (well, their shared name, iykyk) live here rent-free in the manual forever πβ¨
So like β if you're out here slaying with dnf5, maybe send a little love back to the contributors who made it happen. It's the least you can do, fr fr π¦πΈ
And that's a wrap on DNF5-CONFIG-MANAGER(8)! π
This page comes to you courtesy of the dnf5 project, version Oct 17, 2026 β go forth, manage that config, and stay slay πβπ
<div align="center">β fin β</div>
π¦ where this page comes from
- arch rolling: dnf5 5.4.6.0-2 Β· 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