Your Fedora system gets its software from repositories, or repos. Each of these repos can have any number of software apps available for you to install and use. The official Fedora repos contain thousands of free and open source apps. Some repos may have free or proprietary apps. Some only contain one. You may want to configure software repositories at certain times.

Fortunately, this is easy in Fedora. For instance, you may want to get a package to test and see if it fixes a bug. In that case, you’d want to turn on Fedora’s testing repo. You might want to leave it on to get more packages for testing. Or you might want to turn it off, to stop participating.

Configuring with the command line

To configure repos at the command line, use the dnf command. To see a list of all enabled repos, use this command:

sudo dnf repolist

You can use command options to change configuration for just one command. To enable or disable a repo just once, use a command option:

sudo dnf --enablerepo=<reponame>...
sudo dnf --disablerepo=<reponame>...

Follow the option with the actual dnf command. For instance, to install the latest kernel from Fedora’s test repo:

sudo dnf --enablerepo=updates-testing install kernel\*

You can combine several enable and disable options together. For example:

sudo dnf --enablerepo=repo1 --disablerepo=repo2,repo3 install <package>

If you want to change the defaults permanently, use these commands:

sudo dnf config-manager --set-enabled <reponame>
sudo dnf config-manager --set-disabled <reponame>

Backing out confusion

Perhaps you install, update, or remove a lot of software using different setups. In this case, things may get confusing. You might not know which software is installed from what repos. If that happens, try this.

First, disable extra repos such as those ending in –testing. Ideally, enable only fedora and updates repos. Run this command for each unwanted repo:

sudo dnf config-manager --set-disabled <unwanted-repo>

Then run this command to synchronize your system with just stable, updated packages:

sudo dnf distro-sync

This ensures your Fedora system is only using the latest packages from specific repos.

For lots more detail on repositories, visit the Fedora wiki.