RPM/DNF/FAQ
F.A.Q. Contents
General Questions
- What does DNF stand for ?
- Can I have DNF and Yum installed side by side ?
- What to do with packages that DNF refuses to remove because their %pre or %preun scripts are failing ?
- Why are dnf check-update packages not marked for upgrade in the following dnf upgrade ?
- Why do I get different results with dnf upgrade vs yum update ?
- Is it possible to force DNF to get the latest metadata on dnf upgrade ?
- How do I disable automatic metadata synchronization service ?
- Shouldn't DNF exit soon from certain commands if it is not run under root ?
Using DNF in Fedora
General Questions
You can usually remove such package with rpm:
rpm -e <package-version> --noscripts
$ dnf check-update libocsync0.x86_64 0.91.4-2.1 devel_repo owncloud-client.x86_64 1.5.0-18.1 devel_repo
Yet the immediately following dnf upgrade does not offer them for upgrade:
$ dnf upgrade Resolving dependencies --> Starting dependency resolution --> Finished dependency resolution Dependencies resolved. Nothing to do.
It might seem odd but in fact this can happen quite easily: what the first command does is only check whether there are some available packages with the same name as an installed package but with a higher version. Those are considered upgrade candidates by check-update, but no actual dependency resolving takes place there. That only happens during dnf upgrade and if the resolving procedure then discovers that some of the packages do not have their dependencies ready yet, then they are not offered in the upgrade. To see the precise reason why it was not possible to do the upgrade in this case, use:
$ dnf upgrade --best
$ dnf clean metadata $ dnf upgrade
An alternative is to shorten the default expiry time of repos, for that edit <path>/etc/dnf/dnf.conf</path> and set:
metadata_expire=0
Of course, some repos might use a custom metadata_expire value, you'll currently have to change these manually too.
If you're the kind of the user who always wants the freshest metadata possible, you'll probably want to disable the automatic metadata updates.
metadata_timer_sync=0
Using DNF in Fedora
- first install the necessary .repo files :
dnf install fedora-release-rawhide
- Then, when you want to include the packages from the rawhide repo, execute a DNF command with Rawhide enabled :
dnf install --enablerepo=rawhide upgrade rpm