I'm having to deal with a Debian server, which initially was Squeeze, I believe, but where administrator enabled several distributions:

deb http://mirror.yandex.ru/debian/ stable main contrib non-free
deb http://mirror.yandex.ru/debian/ testing main contrib non-free
deb http://security.debian.org/ testing/updates main contrib non-free
deb http://mirror.yandex.ru/debian/ unstable main contrib non-free
deb http://mirror.yandex.ru/debian/ experimental main contrib non-free

and specified in /etc/apt/apt.conf: APT::Default-Release "testing";.

As a result, when I'm asking aptitude or apt about state of a certain package it bears controversial testimony:

me@server: aptitude search emboss
i A emboss                                       - european molecular biology open software suite   

me@server: aptitude show emboss
Package: emboss                          
New: yes
State: not installed
Automatically installed: yes

apt-cache show emboss shows information on 4 copies of the package of interest ("emboss"), out of which one copy contains line Status: install ok installed, which means that it is installed, I assume.

Package: emboss
Status: install ok installed
Priority: optional
Section: science
Installed-Size: 4020
Maintainer: Debian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Architecture: amd64
Version: 6.3.1-6
Depends: emboss-lib (= 6.3.1-6), libc6 (>= 2.7), libexpat1 (>= 1.95.8), libfontconfig1 (>= 2.8.0), libfreetype6 (>= 2.2.1), libgd2-noxpm (>= 2.0.36~rc1~dfsg) | libgd2-xpm (>= 2.0.36~rc1~dfsg), libhpdf-2.1.0 (>= 2.1.0+dfsg), libjpeg62 (>= 6b1), libmysqlclient16 (>= 5.1.21-1), libpng12-0 (>= 1.2.13-4), libpq5 (>= 8.4~0cvs20090328), libx11-6, libxpm4, zlib1g (>= 1:1.1.4), emboss-data (= 6.3.1-6)
Recommends: primer3, dialign
Suggests: emboss-doc, emboss-test, embassy, clustalw
Description: the european molecular biology open software suite
 EMBOSS is a free Open Source software analysis package specially developed for
 the needs of the molecular biology (e.g. EMBnet) user community. The software
 automatically copes with data in a variety of formats and even allows
 transparent retrieval of sequence data from the web. Also, as extensive
 libraries are provided with the package, it is a platform to allow other
 scientists to develop and release software in true open source spirit. EMBOSS
 also integrates a range of currently available packages and tools for sequence
 analysis into a seamless whole. EMBOSS breaks the historical trend towards
 commercial software packages.
Homepage: http://emboss.sourceforge.net

My questions are: 1) How do I know, from which distribution (stable, testing, unstable, experimental) currently installed version of package was taken? How do I refer to it in commands (e.g. in dpkg -L)? 2) How aptitude commands (show and search) choose, which version of the package they should report? Why algorithms of show and search differ?

P.S. Please, don't reply that creating a mix of distributions is a bad practice. I totally agree, but still have to deal with that machine.


apt-cache policy packagename_here can tell you which version of a package is available in which repository.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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