Recently while running the dnf package manager in Fedora in order to update my packages, I encountered the following error:

Invalid configuration value: failovermethod=priority in /etc/yum.repos.d/fedora.repo; Configuration: OptionBinding with id "failovermethod" does not exist

Upon investigating this error further, I found that this parameter had to be removed from the different files which hold the repository information for the different packages installed in Fedora Linux. Here’s how to remove it:

Method #1

Go through all your repository files located in /etc/yum.repos.d/ and remove/comment out the line which contains failovermethod.

NOTE: You will have to either sudo or login as root in order to do this.

Method #2

Using the command line tool sed, we first start off by making a backup of the repository files:

sudo sed -iBAK '/^failovermethod=/d' /etc/yum.repos.d/*.repo

We then use the sed command again to remove the problematic parameter in the repository files:

sudo sed '/^failovermethod=/d' /etc/yum.repos.d/*.repo

Once you have used either methods, you can run dnf to check whether the error appears again:

dnf upgrade