8

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

11

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

1
  • 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. Commented Aug 10, 2021 at 2:35

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.