I want to know all the dependent rpms including recursive of a particular rpm. Is it possible?

I know that in rpm there is an option -R,--require to now the dependency of an rpm. But I want to know even the dependency of dependent rpms.

for eg:

rpm -qR x.rpm


a will in turn dependent on p,q,r. How do I know that?


The solution is to use rpmgraph.

man rpmgraph:

       rpmgraph - Display RPM Package Dependency Graph

       rpmgraph PACKAGE_FILE ...

       rpmgraph  uses  PACKAGE_FILE  arguments  to generate a package dependency graph. 
       Each PACKAGE_FILE argument is read and added to an rpm transaction set. The 
       elements of the transaction set are partially ordered using a topological sort. 
       The partially ordered elements are then printed  to  standard output.
  • 1
    Just a note that the rpmgraph command is part of the Red Hat rpm-devel package. So, that package needs to be installed in order to use the rpmgraph command. – ZaSter Feb 20 '13 at 23:55

rpm -q --whatrequires

I am wondering if this can be done , without installing package and same for build-dependencies, using zypper etc

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.