Ask Your Question

How to configure dnf not to sync meta data automatically ?

asked 2018-11-27 07:01:55 -0500

Chitholian gravatar image

Fedora 29, Although I have configured the repos as metadata-expires to 7d, dnf downloads them randomly throughout the day! (obviously only when I run some dnf install command). It is almost more than 60MB of data it downloads. So, how to make it so that it will not download the meta data unless I explicitly do that ?

edit retag flag offensive close merge delete


You have changed the option to 7d for all repos that are enabled on your system? And you are not using the --refresh option?!

florian gravatar imageflorian ( 2018-11-27 20:44:28 -0500 )edit

Metadata downloads should be smaller with Fedora 30 so in a couple of months things should improve. In the meantime @florian's answer should help.

ozeszty gravatar imageozeszty ( 2018-11-28 13:55:44 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-11-27 20:52:19 -0500

florian gravatar image

updated 2018-11-28 15:27:03 -0500

You could add


to /etc/dnf/dnf.conf to completely disable automatic metadata synchronizing.

See [1] for information on what that does.

Another option is to set


to make the repo never considered expired. You can do this for certain repos or globally in dnf.conf.

Under [1] it also says: Expire of metadata can bee also triggered by change of timestamp of configuration files (dnf.conf, <repo>.repo). See also check_config_file_age([2]). So, at some point you want to stop messing around with dnf.conf and *.repo and let dnf do its thing.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-11-27 07:01:55 -0500

Seen: 79 times

Last updated: Nov 28 '18