LinuxCommandLibrary

dnf-config-manager

Manage DNF repository configurations

TLDR

Add (and enable) a repository from a URL

$ dnf config-manager --add-repo=[repository_url]
copy

Print current configuration values
$ dnf config-manager --dump
copy

Enable a specific repository
$ dnf config-manager --set-enabled [repository_id]
copy

Disable specified repositories
$ dnf config-manager --set-disabled [repository_id1 repository_id2 ...]
copy

Set a configuration option for a repository
$ dnf config-manager --setopt=[option]=[value]
copy

Display help
$ dnf config-manager --help-cmd
copy

SYNOPSIS

dnf config-manager [options] [repository...]

PARAMETERS

--add-repo
    Add a repo file pointing to the specified repourl.

--set-enabled
    Enable the specified repository.

--set-disabled
    Disable the specified repository.

--enable
    Same as --set-enabled.

--disable
    Same as --set-disabled.

--setopt .
    Set an option in the specified repository.

--save
    Save current configuration of repository back to the repository configuration file.

--dump
    Dump current configuration from all repositories into stdout.

--nogpgcheck
    Disable gpgcheck on the repository.

--force
    Force actions even if errors occur.

--help
    Show the help message and exit.

--version
    Show program's version number and exit.

DESCRIPTION

The `dnf-config-manager` command is a utility for managing DNF (Dandified Yum) repositories and configuration options. It simplifies the process of enabling, disabling, adding, and modifying DNF repositories. This tool provides an easy way to add or modify repository configurations directly from the command line. It supports setting properties like the repository's name, base URL, enabling/disabling, gpgcheck, and more. Additionally, it can add repositories directly from a URL.
The `dnf-config-manager` significantly streamlines repository management compared to manually editing configuration files. It also supports setting arbitrary DNF configuration options.

CAVEATS

Changes made using `dnf-config-manager` directly affect the repository configuration files. Ensure proper backups if necessary.

EXAMPLE USAGE

Add a repository:
`dnf config-manager --add-repo https://example.com/repo.repo`

Enable a repository:
`dnf config-manager --set-enabled myrepo`

Disable gpgcheck:
`dnf config-manager --setopt myrepo.gpgcheck=0`

REPOSITORY FILES

Repository configuration files are typically located in the `/etc/yum.repos.d/` directory. dnf-config-manager modifies these files.

HISTORY

The `dnf-config-manager` command was introduced as part of the DNF package manager ecosystem. It builds upon the functionality of `yum-config-manager` from previous versions of YUM, providing a modern and improved interface for repository management. Its primary goal is to simplify the process of adding, modifying, and managing DNF repositories. The development of dnf-config-manager is closely tied to the evolution of the DNF package manager as a replacement for YUM. It inherits some concepts from yum-config-manager but has been redesigned to work with DNF's architecture.

SEE ALSO

dnf(8), yum(8)

Copied to clipboard