How to temporarily enable an RPM Fusion repository?

a related post about Fedora 33

I personally need intel-media-driver from the non-free repo (for video hardware acceleration) and I don’t want to permanently enable the said repo, since I don’t run other software considered as “non-free” by Fedora.

The command shared by Glenn Johnson doesn’t work anymore — I don’t know if due to upgrading to Fedora 34 or some other change(s).

sudo dnf --enablerepo=rpmfusion-nonfree install programname

returns the error:

Error: Unknown repo: 'rpmfusion-nonfree'
1 Like

Install the repo, keep it disabled by default (see .repo file), then enable it on an as-need basis using the command you used.

2 Likes

if you read in the dnf’s manpage, you may find this option:

   --repo=<repoid>, --repoid=<repoid>
          Enable just specific repositories by an id or a glob. Can be used multiple times with accumulative effect. It is basically a shortcut for --disablerepo="*" --enablerepo=<repoid>  and  is  mutually  exclusive  with  the
          --disablerepo option.

You can give a try.
The repo should already be installed, not enabled, as augenauf said.

I don’t think the repo is installed by default. You will need to install it, then using the following steps identify and disable it.

dnf repolist
will give all the repos currently enabled,
dnf repolist all
will give all the repos currently installed with their status to the far right.

Once you have the repo name then
dnf config-manager [disable|enable] reponame
will permanently enable or disable that repo.

The command you were previously given will then temporarily enable a disabled repo to do the install but leave it routinely disabled.