Hot answers tagged

106 votes
Accepted

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

You can install using a specific name-version as described in the man page: dnf install tito-0.5.6-1.fc22 Install package with specific version. If the package is already installed it will ...
Dani_l's user avatar
  • 4,935
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
  • 21.7k
36 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
30 votes

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

Yes. You can install older version of package using dnf downgrade package-name[-version] if you already installed new one. But the old version still needs to be available on mirrors. If the package ...
Jakuje's user avatar
  • 21.3k
29 votes
Accepted

What is the difference between "dnf history rollback" and "dnf history undo"?

undo only undoes that specific transaction, while rollback undoes everything between that transaction and the current state of the system. Example: you install htop, then later install ncdu and ...
Mio Rin's user avatar
  • 3,010
22 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
  • 493
22 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
20 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
  • 326
17 votes

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

Just in case anybody ends up here, like me, looking for the equivalent answer for dnf on Fedora I fathomed out the following python one-liner: python3 -c 'import dnf, pprint; db = dnf.dnf.Base(); ...
sysadmiral's user avatar
  • 1,594
17 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
16 votes
Accepted

When is Centos going to replace yum with dnf ?

CentOS 7 corresponds to Red Hat Enterprise Linux 7, released in June 2014. dnf was made the replacement for yum in Fedora 23, released in November 2015. There's no provision for making fundamental ...
Thomas Dickey's user avatar
16 votes
Accepted

How to revert a `dnf install`?

I don't know the answer to the first part of your question. If you have dnf history recording activated (I think it's on by default), you can use that to undo the installation: sudo dnf history | ...
Stephen Kitt's user avatar
16 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
16 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
15 votes
Accepted

How do display a list of packages a certain package provides for?

could be dnf repoquery --alldeps --whatrequires to get the reverse dependencies
Jaleks's user avatar
  • 2,569
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,354
15 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
14 votes
Accepted

Does dnf have an equivalent to apt's "build-dep"

There is, it's sudo dnf builddep httpd builddep is a dnf plugin, so it's not documented in the dnf manpage. It is described in the DNF plugin documentation, and it has its own manpage, dnf.plugin....
Stephen Kitt's user avatar
14 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
  • 419
14 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
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
  • 40.1k
11 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
10 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
  • 116
10 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
10 votes
Accepted

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

But... you are saying "No": Is this ok [y/N]: n ...when asked to install the key! Try with yes (y) instead!
maulinglawns's user avatar
  • 8,526
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,216
9 votes

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

I would suggest rpm for this task: rpm -qpl ./some_package.rpm
BulletBob's user avatar
  • 646
9 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
8 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

Error after installing dnf on CentOS 7

I am not sure why this is, but it looks like the epel-release repository (from where you install dnf) is not compatible with dnf itself. After installing dnf, first remove this using yum: yum remove ...
Anthon's user avatar
  • 79.1k

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