I have few rpm repos in my Fedora installation and I've want to download source package and got error that synchronization of rpmfusion-free-updates-source and rpmfusion-nonfree-updates-source failed. they probably don't have source.

I've executed this command, that returned error:

sudo dnf download --source hicolor-icon-theme

is it possible to ignore repo, without disabled it for just one command? The download was successful but I want to know if something like this is possible.

1 Answer 1


To ignore a repository:

dnf --disablerepo=<repoid> ...

This enables disabling a repository for a single command. Similarly, one can use --enablerepo=<repoid> to dynamically add a repository to your standard configuration for the command being run.

You can stack a list or repositories to skip, too, with (for example):

dnf --disablerepo=fedora-modular,updates-modular ...
  • Yes but, isn't --disablerepo disabling repo from whole system? Or is it just for single command?
    – jcubic
    Commented Dec 7, 2018 at 22:27
  • It seems that this don't work and my question also was wrong because the issue is to to disable repo but something with cache, my exact error is Failed to synchronize cache for repo 'rpmfusion-free-updates-source', ignoring this repo. this command don't solve the issue sudo dnf --disablerepo=rpmfusion-free-updates-source,rpmfusion-nonfree-updates-source download --source hicolor-icon-theme
    – jcubic
    Commented Dec 8, 2018 at 9:53
  • Please try dnf clean all and then, dnf --disablerepo=rpmfusion-free-updates-source,rpmfusion-nonfree-updates-source repolist. You should not see the rpmfusion repo-ids in the output list.
    – JRFerguson
    Commented Dec 8, 2018 at 12:53
  • Re-reading your last comment: if you do want the repositories enabled but are getting a synchronization error, try dnf clean all before your download (without disabling anything). Generally, synchronization errors point to an inability to reach a repository (e.g. not connected to a network, etc.).
    – JRFerguson
    Commented Dec 8, 2018 at 16:09
  • Marking as solved since this is in fact was correct answer to my question. dnf clean all didn't solved synch issue, I think it just removed downloaded files.
    – jcubic
    Commented Dec 8, 2018 at 19:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .