LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

dnf-config-manager

manage DNF repositories and configuration

TLDR

Add repository from URL
$ dnf config-manager --add-repo=[repository_url]
copy
Print current configuration
$ dnf config-manager --dump
copy
Enable a repository
$ dnf config-manager --set-enabled [repository_id]
copy
Disable repositories
$ dnf config-manager --set-disabled [repository_id1] [repository_id2]
copy
Set configuration option
$ dnf config-manager --setopt=[option]=[value]
copy

SYNOPSIS

dnf config-manager [options]

DESCRIPTION

dnf config-manager provides command-line management of DNF repositories and configuration settings. It's part of dnf-plugins-core and offers an alternative to manually editing configuration files.The tool can add repositories from URLs (creating .repo files automatically), enable or disable existing repositories, and modify DNF configuration options on the fly. Changes to repositories are persisted in /etc/yum.repos.d/ as .repo files. This is particularly useful for scripted repository management, adding third-party repositories, or temporarily adjusting configuration without editing files manually. The --dump option is helpful for troubleshooting by showing the complete effective configuration.

PARAMETERS

--add-repo url

Add repository from URL
--dump
Print current configuration
--set-enabled repo
Enable repository
--set-disabled repo
Disable repository
--setopt opt=val
Set configuration option
--save
Persist `--setopt` changes to the appropriate configuration file (by default changes are session-only).
--dump-variables
Print the effective values of the built-in DNF variables (`$releasever`, `$basearch`, …).
--help-cmd
Display help

CONFIGURATION

**/etc/yum.repos.d/*.repo**

Repository configuration files. Changes made by dnf config-manager persist here.
/etc/dnf/dnf.conf
Main DNF configuration file. Options can be modified using --setopt.

CAVEATS

Requires dnf-plugins-core on DNF 4. On DNF 5 (Fedora 41+) the plugin has been merged into the main binary and the subcommand is invoked as dnf5 config-manager; most flags carry over but --set-enabled/--set-disabled become enable/disable subcommands. Repository changes require root. Changes to `.repo` files persist in `/etc/yum.repos.d/`.

SEE ALSO

dnf(8), dnf5(8), yum-config-manager(1), yum(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid