Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I was wondering if it was possible to check what package another package is a dependency of.

For example, jetty is mysteriously installed and running on my system and I'd like to check whether it is a dependency of something else.

share|improve this question

3 Answers 3

up vote 47 down vote accepted

You can use apt-cache rdepends jetty to see what depends on jetty. This will show both depends & recommends, so you may want to check through the list of packages to see what the relationship is with jetty.

share|improve this answer
    
I misread that as apt-rdepends, which I'd already installed. It's probably worth pointing out that they're not the same. –  Roger Lipscombe Sep 29 '13 at 8:28
1  
Also,apt-cache rdepends jetty will show you packages that break (and, i suppose, conflict with) jetty. –  thor Oct 4 '13 at 12:42
7  
This helped me, but only the --installed flag made it perfect! –  dualed Jan 1 at 17:26
    
@thor, yeah, it includes Depends, Recommends, Replaces, and Conflicts, which is unintuitive. However, you can turn this off with --no-pre-depends --no-recommends --no-suggests --no-conflicts --no-breaks --no-replaces --no-enhances as desired. There is also --no-depends, but normally for rdepends you want that. There is also --installed, which limits to installed packages. –  Matthew Flaschen Jul 3 at 23:38

If you open Synaptic and find the package, you can right click on it and select Properties. Under the tab Dependencies you can see the packages that jetty depend on, and which packages is dependent on jetty (the dropdown list).

share|improve this answer

Go install apt-rdepends. It doesn't only show immediate dependencies, but all the recursive ones, so will tend to give you a large output. So, use a pager as well.

  • To display recursive depends: $ apt-rdepends jetty | pager.
  • To display recursive reverse depends: $ apt-rdepends --reverse jetty | pager.
share|improve this answer
2  
The OP was asking for reverse dependencies, not recursive dependencies. Confusingly, apt-rdepends and apt-cache rdepends do very different things despite their similar appearance. –  Flimm Feb 8 '11 at 18:28
    
@fli You made me look closer at my answer, and I have corrected it. Thanks. –  Tshepang Feb 8 '11 at 20:49

Your Answer

 
discard

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.