Skip to main content
43 votes
Accepted

How to use DNF to find out package versions available in a different release of Fedora?

You can pass dnf a --releasever= argument to override the version. For the particular command you gave as an example, use the following: dnf --releasever=29 --showduplicates list $pkgname
filbranden's user avatar
  • 22.6k
37 votes
Accepted

What is the purpose of /usr/lib/.build-id/ dir?

/usr/lib/.build-id contains the main build-id files for installed packages. Before Fedora 27, these lived alongside the debug files in /usr/lib/debug, and were only shipped in debug RPMs. In Fedora 27,...
Stephen Kitt's user avatar
27 votes

How to pin a package in dnf (Fedora)

The Fedora docs now have a Quick Doc to address this question. To summarize here: To pin a package, there is the versionlock plugin available as part of dnf-plugins-core package. See man dnf-...
wardw's user avatar
  • 396
27 votes

Listing packages explicitly installed by the user using dnf

dnf distinguishes [1] between manually installed packages packages that are only installed as a dependency of a manually installed package packages that were installed as part of a group To get a ...
inorik's user avatar
  • 553
26 votes
Accepted

How to get epel-release / epel-release-next / powertools in CentOS Stream 9

powertools are called crb(CodeReady Linux Builder, or epel 9) now. To enable it, run dnf config-manager --set-enabled crb For other versions of epel, check the documentation from Fedora. https://...
MaxPlankton's user avatar
19 votes
Accepted

"package X requires Y, but none of the providers can be installed"

If some of your packages have unsatisfied dependencies, the upgrade will refuse to continue until you run it again with an extra --allowerasing option. This often happens with packages installed from ...
sourcejedi's user avatar
  • 53.5k
19 votes
Accepted

Safely uninstalling GNOME desktop environment on Fedora 29

You can actually remove and install packages in the same operation, with dnf swap. And since the option takes groups as well as just single package names, you can switch one for another very simply: ...
Michael Hampton's user avatar
16 votes

Yum: How can I view variables like $releasever, $basearch & $YUM0?

For a full dump you can use: yum config-manager --dump dnf config-manager --dump To dump variables you can use: yum config-manager --dump-variables dnf config-manager --dump-variables yum-config-...
Stephanie's user avatar
  • 161
16 votes

How to (temporarily) prevent yum / dnf from updating repositories?

I know this question is a little old (and this option might be new) but this just worked for me: -C, --cacheonly Run entirely from system cache, don't update the cache and use it even ...
nhed's user avatar
  • 471
16 votes
Accepted

How use dnf command without updating the repositories?

Use the --cacheonly (or -C) option; this will use the system cache only, without updating it.
Stephen Kitt's user avatar
15 votes
Accepted

How to pin a package in dnf (Fedora)

The excludepkgs configuration option in dnf.conf lists packages that dnf should never try to install or upgrade; in a repo section it affects only that repo, in [main] all repos are affected. See the ...
Ignacio Vazquez-Abrams's user avatar
15 votes

Error: GPG check FAILED when upgrading system using dnf in Fedora

Use this command to solve this: dnf update --nogpgcheck
Danilo Rodrigues Bispo's user avatar
15 votes

Why don't package managers have per-user installations and registries?

While common package managers don't address this use case, there are several projects that do: Zero Install Linuxbrew - a port of Homebrew for Linux Gentoo Prefix Nix pkgsrc - can be used to install ...
jayhendren's user avatar
  • 8,676
15 votes
Accepted

How can I check the last set of packages updated with DNF?

You are looking for: dnf history Using the DNF transaction ID from the list, details can be obtained with: dnf history info N where N is a transaction ID. Transaction roll-back can also be done with ...
JRFerguson's user avatar
  • 15.2k
14 votes
Accepted

libssh2 filtered out by modular filtering on RHEL 8

The easiest you can do is bypass module filtering. Edit /etc/yum.repos.d/epel.repo and add module_hotfixes=1 line under the [epel] section. Done. The installation will succeed. However the above can ...
Danila Vershinin's user avatar
12 votes

Can I force dnf to install an old version of a package?

You can perform a simple downgrade by: sudo dnf downgrade <package-name> For instance: sudo dnf downgrade podman
Artur Barseghyan's user avatar
12 votes

dnf breaks when changing symlink from python3.9 to 3.10

Don't do that: if you want to use different version of Python for your projects or development you need to either use the versioned command python3.x or virtual environments. System tools like DNF ...
Vojtech Trefny's user avatar
11 votes

dnf error conflicting packages between i686 and x86_64

The most typical cause of this error is trying to install packages without having everything up to date. That sometimes causes new dependencies to be brought in which conflict with packages already on ...
mattdm's user avatar
  • 41.3k
11 votes
Accepted

Find files not installed by RPM package manager

a bit late to the party, but hopefully someone will find this useful: find /usr/ -exec /bin/sh -c 'rpm -qf -- "$1" >/dev/null 2>&1 || echo "$1"' find_sh {} \; This ...
akors's user avatar
  • 126
11 votes
Accepted

DNF: how to I check which package installed a specific package?

A single package can be required by multiple different packages so it's not always obvious, specially if you installed a bulk of them. Ways to check it: sudo dnf repoquery --whatrequires package or ...
Artem S. Tashkinov's user avatar
10 votes
Accepted

Necessity of sudo while installing with dnf

In the scenario you describe, "you" are not installing the package that is installed - the PackageKit service (which is already running as root) is doing the installation on your behalf. ...
patbarron's user avatar
  • 1,306
10 votes
Accepted

How to tell "dnf search" to list only matches in the package name (or name and summary), but not only in the summary?

DNF unfortunately doesn't have an option to search only in the package name, there is an old RFE for this feature, but there was no activity since 2015. You can try using dnf list which can show both ...
Vojtech Trefny's user avatar
9 votes
Accepted

DNF. How to find which group package belongs to?

Since Fedora 26, the following works: dnf repoquery --groupmember <pkg-name> See the bug report where this feature was implemented.
Roshan Shariff's user avatar
8 votes
Accepted

How to install libpq-dev on fedora?

The package name is libpq-devel: sudo dnf install libpq-devel Description : libpq-devel - Development files for building PostgreSQL client tools The libpq package provides the essential shared ...
GAD3R's user avatar
  • 69.9k
8 votes
Accepted

How do I remove a package with a failing scriptlet in Fedora 32?

This is already described e.g. here: https://serverfault.com/questions/613256/yum-error-in-preun-scriptlet-when-removing-packages YUM has been replaced by DNF but this option remains the same. dnf --...
Beko Pharm's user avatar
8 votes

How can I show the changelog of packages in DNF?

Use the changelog plugin from dnf-plugins-core sudo dnf install dnf-plugins-core then dnf changelog <options>
Steve V.'s user avatar
  • 1,055
8 votes

Is dnf supported on Centos 7?

There are multiple arguments for the thesis that it is not supported: Here's what I found: The dnf GitHub project's README provides info how to install it only for Fedora and states "In other ...
Greg Dubicki's user avatar
8 votes

How to list contents of a local .rpm file using dnf?

You only need rpm; you can list the files shipped in an RPM with: rpm -qlp /path/to/your.rpm An additional -v will add file details: rpm -qvlp /path/to/your.rpm To see the included scripts, which ...
Stephen Kitt's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible