Is there a 1-to-1 relationship between repo IDs/names and .repo file names in DNF?


Since there is no command in dnf to delete repos, is it possible to find out the .repo file name by looking at the output of dnf repolist?

First, a general comment. You have a tendency to ask lots of questions without any context. If you explained the ultimate outcome you were trying to achieve, we could provide much better help. There are typically multiple ways to solve a problem.

You can disable them with

sudo dnf config-manager --set-disabled reponame

No. However, you could parse the files to see the contents and match on the contents.


Specifically not interested in enabling or disabling.
As to outcome, it is too much for this resource’s format. I’d rather not waste anyone’s time since your answers work perfectly fine for my use case.