Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 1 down vote accepted

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.
share|improve this answer
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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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