I would like to to know more about what is actually installed for a given package (for a debug purpose).

All the option with apt-cache only give the the dependant packages, maybe the needed version, but not the installed version of these ones.

I know it is not so hard to make a script, but I am curious to find an existing solution (I sure I am not the first to make this!)

Thanks

link|improve this question

0% accept rate
feedback

2 Answers

I am a little confused by your question as i understand it using the rdepends utility should show you what you need (this should be available in the repos for whatever distro you are using) so for instance:

$ apt-rdepends bash
Reading package lists... Done
Building dependency tree       
Reading state information... Done
bash
  Depends: base-files (>= 2.1.12)
  Depends: debianutils (>= 2.15)
  PreDepends: libc6 (>= 2.7-1)
  PreDepends: libncurses5 (>= 5.6+20071006-3)
base-files
  Depends: base-passwd (>= 2.0.3.4)
  PreDepends: awk
...

is what shows up for bash.

link|improve this answer
No, it shows you the minimum required: bash-files >= 2.1.12, but actually the 5.0.0 is installed, for libc6 the 2.7-1 is required but the 2.9-4 is installed etc... So no, this is not what I want. – Jérôme May 25 '09 at 12:43
feedback

The "-s" option for apt-get will show you what other packages will be installed to install a particular package on your system without actually installing anything. Is that what you're looking for?

xen1:~# apt-get -s install spamassassin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  binutils cpp cpp-4.3 gcc gcc-4.3 libc6-dev libdigest-hmac-perl
  libdigest-sha1-perl liberror-perl libgmp3c2 libgomp1 libio-socket-inet6-perl
  libmail-spf-perl libmpfr1ldbl libnet-dns-perl libnet-ip-perl
  libnetaddr-ip-perl libsocket6-perl libsys-hostname-long-perl
  libsys-syslog-perl linux-libc-dev make re2c spamc
Suggested packages:
  binutils-doc cpp-doc gcc-4.3-locales gcc-multilib manpages-dev autoconf
  automake1.9 libtool flex bison gdb gcc-doc gcc-4.3-multilib
  libmudflap0-4.3-dev gcc-4.3-doc libgcc1-dbg libgomp1-dbg libmudflap0-dbg
  glibc-doc make-doc razor libnet-ident-perl libio-socket-ssl-perl pyzor
  libmail-dkim-perl
The following NEW packages will be installed:
  binutils cpp cpp-4.3 gcc gcc-4.3 libc6-dev libdigest-hmac-perl
  libdigest-sha1-perl liberror-perl libgmp3c2 libgomp1 libio-socket-inet6-perl
  libmail-spf-perl libmpfr1ldbl libnet-dns-perl libnet-ip-perl
  libnetaddr-ip-perl libsocket6-perl libsys-hostname-long-perl
  libsys-syslog-perl linux-libc-dev make re2c spamassassin spamc
0 upgraded, 25 newly installed, 0 to remove and 0 not upgraded.
Inst binutils (2.18.1~cvs20080103-7 Debian:5.0.1/stable)
Inst libgmp3c2 (2:4.2.2+dfsg-3 Debian:5.0.1/stable)
Inst libmpfr1ldbl (2.3.1.dfsg.1-2 Debian:5.0.1/stable)
Inst cpp-4.3 (4.3.2-1.1 Debian:5.0.1/stable)
Inst cpp (4:4.3.2-2 Debian:5.0.1/stable)
Inst libgomp1 (4.3.2-1.1 Debian:5.0.1/stable)
Inst gcc-4.3 (4.3.2-1.1 Debian:5.0.1/stable)
Inst gcc (4:4.3.2-2 Debian:5.0.1/stable)
Inst linux-libc-dev (2.6.26-15lenny2 Debian-Security:5.0/stable)
Inst libc6-dev (2.7-18 Debian:5.0.1/stable)
Inst libdigest-sha1-perl (2.11-2+b1 Debian:5.0.1/stable)
Inst libdigest-hmac-perl (1.01-7 Debian:5.0.1/stable)
Inst liberror-perl (0.17-1 Debian:5.0.1/stable)
Inst libsocket6-perl (0.20-1 Debian:5.0.1/stable)
Inst libio-socket-inet6-perl (2.54-1 Debian:5.0.1/stable)
Inst libnetaddr-ip-perl (4.007+dfsg-2+b1 Debian:5.0.1/stable)
Inst libnet-ip-perl (1.25-2 Debian:5.0.1/stable)
Inst libnet-dns-perl (0.63-2 Debian:5.0.1/stable)
Inst libmail-spf-perl (2.005-1 Debian:5.0.1/stable)
Inst libsys-hostname-long-perl (1.4-2 Debian:5.0.1/stable)
Inst libsys-syslog-perl (0.26-1 Debian:5.0.1/stable)
Inst make (3.81-5 Debian:5.0.1/stable)
Inst re2c (0.13.5-1 Debian:5.0.1/stable)
Inst spamassassin (3.2.5-2 Debian:5.0.1/stable)
Inst spamc (3.2.5-2 Debian:5.0.1/stable)
Conf binutils (2.18.1~cvs20080103-7 Debian:5.0.1/stable)
Conf libgmp3c2 (2:4.2.2+dfsg-3 Debian:5.0.1/stable)
Conf libmpfr1ldbl (2.3.1.dfsg.1-2 Debian:5.0.1/stable)
Conf cpp-4.3 (4.3.2-1.1 Debian:5.0.1/stable)
Conf cpp (4:4.3.2-2 Debian:5.0.1/stable)
Conf libgomp1 (4.3.2-1.1 Debian:5.0.1/stable)
Conf gcc-4.3 (4.3.2-1.1 Debian:5.0.1/stable)
Conf gcc (4:4.3.2-2 Debian:5.0.1/stable)
Conf linux-libc-dev (2.6.26-15lenny2 Debian-Security:5.0/stable)
Conf libc6-dev (2.7-18 Debian:5.0.1/stable)
Conf libdigest-sha1-perl (2.11-2+b1 Debian:5.0.1/stable)
Conf libdigest-hmac-perl (1.01-7 Debian:5.0.1/stable)
Conf liberror-perl (0.17-1 Debian:5.0.1/stable)
Conf libsocket6-perl (0.20-1 Debian:5.0.1/stable)
Conf libio-socket-inet6-perl (2.54-1 Debian:5.0.1/stable)
Conf libnetaddr-ip-perl (4.007+dfsg-2+b1 Debian:5.0.1/stable)
Conf libnet-ip-perl (1.25-2 Debian:5.0.1/stable)
Conf libnet-dns-perl (0.63-2 Debian:5.0.1/stable)
Conf libmail-spf-perl (2.005-1 Debian:5.0.1/stable)
Conf libsys-hostname-long-perl (1.4-2 Debian:5.0.1/stable)
Conf libsys-syslog-perl (0.26-1 Debian:5.0.1/stable)
Conf make (3.81-5 Debian:5.0.1/stable)
Conf re2c (0.13.5-1 Debian:5.0.1/stable)
Conf spamassassin (3.2.5-2 Debian:5.0.1/stable)
Conf spamc (3.2.5-2 Debian:5.0.1/stable)
xen1:~#
link|improve this answer
Your solution only works with not installed packages. – Jérôme May 25 '09 at 12:44
feedback

Your Answer

 
or
required, but never shown

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