Ask Your Question

dnf.conf exclude does not work

asked 2018-08-02 19:31:33 -0600

andreas574 gravatar image

Hi, I'm new to Fedora. My laptop has an nvidia quadro 4000M card that is compatible with the 390.x drivers from nvidia, but not with the newer 396.x. So, to have a working driver I disabled, the rpmfusion non free update repo and installed the nvidia drivers that are working well. After that, after some googling, I added an exclude command to both and rpmfusion-nonfree-updates.repo, the latter to the enabled section. I even tried to use the excludepkgs command that I didn't understand if it is or not deprecated, but, if I enable back the rpmfusion non free update repo, the updater still asks me to update the nvidia driver, something that's really annoying. For instance, the string I added is: excludepkgs=xorg-x11-drv-nvidia* akmod-nvidia* xorg-x11-drv-nvidia-cuda* nvidia* I wonder if there's a way to override this behaviour, that to me looks like a bug. Thank you in advance for your help.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2018-08-03 14:43:34 -0600

genodeftest gravatar image

updated 2018-08-05 06:04:00 -0600

Please make sure that you separate package names by a comma (,), not by spaces. Also, dnf may be unable to use the asterisk/star symbol * in the dnf.conf file. [EDIT] Askterisk works fine. Thanks for looking it up, @florian! [/EDIT]

I am using dnf.conf with the excludepkgs option and it works fine for me. In my case the line looks like this:

edit flag offensive delete link more



Use of asterix (*) works for me.

florian gravatar imageflorian ( 2018-08-03 18:44:22 -0600 )edit

Thank you for your suggestions, but they do not work for me, with and without the asterisks. I wonder if there is a cache that I should flush before testing the modifications to dnf.conf, or if this behaviour can be related to the kde desktop I'm using, something I guess it's improbable.

andreas574 gravatar imageandreas574 ( 2018-08-03 20:12:06 -0600 )edit

I don’t think there is a caching issue. dnf reads dnf.conf for every transaction, though tiú can try a dnf clean all.

Any typos in your exclude by any chance? Try with a single package first!

florian gravatar imageflorian ( 2018-08-04 03:26:13 -0600 )edit

dnf.conf is store in /etc/dnf/dnf.conf

hhlp gravatar imagehhlp ( 2018-08-04 03:32:38 -0600 )edit

answered 2018-08-05 18:07:16 -0600

andreas574 gravatar image

Unfortunately, even a single file with or without the asterisk does not work. Same for flushing the cache. Can I supply any other information to help solve the problem?

edit flag offensive delete link more


dnf.conf is not meant for excluding files but rather package names.

genodeftest gravatar imagegenodeftest ( 2018-08-17 13:26:17 -0600 )edit

Question Tools


Asked: 2018-08-02 19:31:33 -0600

Seen: 270 times

Last updated: Aug 05 '18