5

example: I can see a package "XYZ" has been installed. I want to find out which package installed XYZ because it's one of its dependencies.

Thanks

1 Answer 1

7

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:

  1. sudo dnf repoquery --whatrequires package or rpm -q --whatrequires package

  2. Simply running sudo dnf history package| egrep -w 'install|upgrade' will show you all the operations with the package and by inspecting them you can infer which other packages required the package.

  3. Also, you can simply try uninstalling the xyz and see what it leads to: sudo dnf --assumeno remove package or rpm -e --test package

2
  • I'm not super familiar with dnf history details, but dnf repoquery --whatrequires package will show all the packages in the repo that depend on package (see --whatrecommends, --whatsuggests, etc., as well). rpm -q --whatrequires package will also show the installed packages that depend on package.
    – rickhg12hs
    Aug 10, 2021 at 2:35
  • 1
    Thank you @rickhg12hs Aug 10, 2021 at 11:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .