Ubuntu – How to trace back which dependency chain leads to some particular package

14.04aptdependenciesopenjdksystemd

For example, openjdk-7-jdk in trusty depends on systemd. How do I figure out dependency chain that leads to systemd? I tried debtree openjdk-7-jdk and apt-rdepends openjdk-7-jdk, but they don't list systemd. What am I doing wrong?

Best Answer

The reason I failed was that systemd is pulled in as a recommendation. This way you can see the recommendations as well:

apt-rdepends openjdk-7-jdk --follow Depends,PreDepends,Recommends \
    --show Depends,PreDepends,Recommends | grep systemd

The dependency chain is as follows:

http://packages.ubuntu.com/trusty-updates/openjdk-7-jdk
http://packages.ubuntu.com/trusty-updates/openjdk-7-jre
http://packages.ubuntu.com/trusty-updates/libgtk-3-0
http://packages.ubuntu.com/trusty/libcolord1 (recommends colord)
http://packages.ubuntu.com/trusty/colord
http://packages.ubuntu.com/trusty-updates/policykit-1
http://packages.ubuntu.com/trusty-updates/libpam-systemd
http://packages.ubuntu.com/trusty-updates/systemd-services

Related Question