LinuxCommandLibrary

yum-config-manager

Manage yum repository configuration

TLDR

View documentation for the original command

$ tldr dnf config-manager
copy

SYNOPSIS

yum-config-manager [options] [repos...]

PARAMETERS

--add-repo REPO_URL
    Add a new repo file pointing to the given URL.

--enable REPO1 [REPO2] ...
    Enable the specified repos (same as setting enabled=1 in the repo file).

--disable REPO1 [REPO2] ...
    Disable the specified repos (same as setting enabled=0 in the repo file).

--setopt REPO.OPTION=VALUE
    Set a specific option in the specified repo. For example: `--setopt=updates.priority=1`.

--save REPO1 [REPO2] ...
    Save changes to the specified repos.

--temp-repo=repoid[,repoid,...]
    Enable the repository temporarily without modifying the configuration file. The repository will be disabled after the yum process exits.

--enable-repo=repoid[,repoid,...]
    Enable the repository, only for the current yum process. It doesn't modify the repository file.

--disable-repo=repoid[,repoid,...]
    Disable the repository, only for the current yum process. It doesn't modify the repository file.

--nogpgcheck
    Disable gpg signature checking.

--verbose
    Be more verbose.

DESCRIPTION

The `yum-config-manager` command provides an interface to manage yum repository configuration. It allows enabling, disabling, adding, and modifying yum repositories. It's commonly used to add repositories that are not enabled by default, configure repository properties like priorities, and generally fine-tune yum's behavior. This command is now part of the `dnf-plugins-core` package in most modern systems.
It simplifies tasks like subscribing to software collections or managing different repository configurations for different environments. `yum-config-manager` modifies the repository configuration files located in `/etc/yum.repos.d/`.

CAVEATS

Changes made by `yum-config-manager` directly affect the repository configuration files.
Using incorrect options can lead to yum errors. Always verify changes before using `yum` after using this command.
On systems using `dnf` instead of `yum`, the equivalent command is `dnf config-manager`.

REPOSITORY PRIORITIES

`yum-config-manager` is often used to set repository priorities using the `--setopt` option, e.g., `--setopt=base.priority=10`. This allows you to define the order in which yum considers packages from different repositories. Lower numbers mean higher priority, meaning that packages from repos with lower numbers are prefered over packages with higher numbers

REPOSITORY FILE LOCATIONS

Repository configuration files, which `yum-config-manager` modifies, are typically located in `/etc/yum.repos.d/`. Each `.repo` file defines the properties of a single repository.

HISTORY

The `yum-config-manager` tool emerged as a helper utility for managing yum repositories beyond the basic `yum` command's capabilities. It was initially developed as part of the `yum-utils` package to simplify common configuration tasks like enabling, disabling, and adding repositories. Over time, its functionalities have been integrated into the `dnf-plugins-core` package as `dnf config-manager` with the transition to dnf package manager.

SEE ALSO

yum(8), dnf(8), dnf-plugins-core(7)

Copied to clipboard