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.

marked as duplicate by Mitch Feb 26 '15 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.

  • 3
    The question that this is marked a duplicate of was asked a year and a half after I asked this one – Magnus Feb 26 '15 at 13:54
  • 1
    Yes, but the duplicate on that question has been asked a month earlier. – jazzpi Jun 8 '15 at 8:30
  • @jazzpi The question listed in the closing reason is not closed as duplicate of another question. – kiamlaluno Aug 27 '17 at 8:59
  • @kiamlaluno Not anymore – jazzpi Sep 3 '17 at 9:55
  • @jazzpi Right, so the argument the question was closed as duplicate of a question asked one year and a half later so the users can see a link to a question asked a month earlier doesn't hold anymore, since that link is not visible up-front anymore. – kiamlaluno Sep 3 '17 at 11:14
up vote 100 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.

  • 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
  • 35
    This helped me, but only the --installed flag made it perfect! – dualed Jan 1 '14 at 17:26
  • 2
    @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
  • 2
    There's a slightly different syntax which helped me to differentiate between Recommends, Depends, Suggests, etc. Syntax is sudo apt rdepends jetty (Notice it is not using apt-cache but simply apt) – Vahid Pazirandeh Nov 16 '17 at 5:23

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.
  • 6
    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
  • 1
    @fli You made me look closer at my answer, and I have corrected it. Thanks. – Tshepang Feb 8 '11 at 20:49
  • It shows more info than apt rdepends. – Timo Mar 22 at 14:12

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).

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