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.

This question already has an answer here:

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

marked as duplicate by Mitch Feb 26 at 6:42

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1  
The question that this is marked a duplicate of was asked a year and a half after I asked this one –  Magnus Feb 26 at 13:54
    
Yes, but the duplicate on that question has been asked a month earlier. –  jazzpi Jun 8 at 8:30

3 Answers 3

up vote 57 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
1  
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
12  
This helped me, but only the --installed flag made it perfect! –  dualed Jan 1 '14 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 '14 at 23:38

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
3  
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

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

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