Añadir o quitar repositorios de software en Fedora

Esta sección describe cómo añadir, habilitar o deshabilitar un repositorio de software con la aplicación DNF.

Añadiendo repositorios

This section describes how to add software repositories with the dnf config-manager command.

  • To add a new repository, do the following as root.

    1. Define a new repository by adding a new file with the .repo suffix to the /etc/yum.repos.d/ directory. For details about various options to use in the .repo file, see the Setting [repository] Options section in the System Administrator’s Guide

    2. Add the newly created repository.

      dnf config-manager --add-repo repository

      Where repository is the path to the created .repo file, for example:

      dnf config-manager --add-repo /etc/yum.repos.d/fedora_extras.repo

Habilitando repositorios

Esta sección muestra como habilitar un repositorio de software concreto usando el comando dnf config-manager.

  • To enable a particular repository, run the following command as root.

    dnf config-manager --set-enabled repository

    Where repository is the unique repository ID, for example:

    dnf config-manager --set-enabled fedora-extras

Disabling repositories

This section shows how to disable a particular software repository by using the dnf config-manager command.

  • To disable a particular repository, run the following command as root.

    dnf config-manager --set-disabled repository

    Where repository is the unique repository ID, for example:

    dnf config-manager --set-disabled fedora-extras

Quitando repositorios

Esta sección muestra como quitar un repositorio Yum (o archivo .repo).

Si usted sabe la ID de un repositorio, pero no está seguro de a que archivo .repo pertenece, puede ejecutar el siguiente comando grep -E "^\[.*]" /etc/yum.repos.d/*. Esto imprimirá una lista de las IDs de repositorio que están asociadas con cada repositorio Yum.

  • To remove a Yum repository, run the following command as root.

    rm /etc/yum.repos.d/file_name.repo

    Where file_name is the name of the .repo file.