Hot answers tagged

87 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 ...
  • 4,534
41 votes

Install Locally using dnf in Fedora without using internet connection

sudo dnf install /path/to/package.rpm will act on the package in the given path.
  • 2,999
34 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
  • 20.1k
31 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,...
28 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 ...
  • 2,792
25 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 ...
  • 20.5k
20 votes

List all RPM packages installed from repo "X"

dnf repo-pkgs <repoid> list installed Notes The command above uses DNF to list the packages installed from the <repoid>. Note repo-pkgs is just an alias of repository-packages. From the ...
  • 3,186
18 votes
Accepted

Reinstalling packages with missing/corrupt files

For reference and completeness sake, one command that would be able to achieve what initially asked for would be something like this (quickly fiddled together, but it's working) rpm -qf $(rpm -Va 2&...
  • 2,629
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(); ...
  • 1,504
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 ...
16 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 ...
  • 45.9k
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: ...
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 ...
  • 7,933
14 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 | ...
13 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 ...
13 votes
Accepted

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

powertools are called crb(CodeReady Linux Builder) now. To enable it, run dnf config-manager --set-enabled crb https://developers.redhat.com/blog/2018/11/15/introducing-codeready-linux-builder
  • 371
11 votes

dnf equivalent of "yum update --security"

You can use dnf-automatic with three settings: apply_updates = yes download_updates = yes upgrade_type = security (Default configuration file is /etc/dnf/automatic.conf) or using: dnf updateinfo ...
  • 147k
11 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....
11 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 ...
  • 371
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 ...
  • 38.6k
10 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-...
  • 226
10 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.
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. ...
  • 1,066
9 votes
Accepted

Yum vs DNF (changed in Fedora 22)

Compared to Yum, DNF offers: Better dependency management Support Extensions other than Python Documented API Lower memory usage Less automatic synchronization of metadata with repositories, a ...
  • 1,948
9 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
  • 2,447
9 votes

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

Use this command to solve this: dnf update --nogpgcheck
9 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 ...
  • 343
9 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 ...
8 votes
Accepted

dnf equivalent of "yum update --security"

Based on http://forums.fedoraforum.org/showthread.php?t=305905 #!/bin/bash SECURITY_UPDATES_LIST=$( dnf --refresh -q updateinfo list sec | awk '{print $3}' ) SECURITY_UPDATES_NUM=`echo "$...
  • 205
8 votes

Package bash-completion missing from Yum in CentOS

There is only one command you have to get bash-completion: yum install epel-release.noarch bash-completion.noarch
  • 221

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