What is the format and meaning of the output of apt list?

I am comparing the packages installed on 2 different servers using apt list --installed.

On one I see this:

adduser/bionic,now 3.116ubuntu1 all [installed]

And the other has:

adduser/bionic,bionic,now 3.116ubuntu1 all [installed]

So why the extra bionic? Also, what does the now mean? Is bionic the original version and now it is at version 3.116?


Solution 1:

The comma-separated list following the package name after a slash seems to be the names of all suites containing the displayed (installed or candidate) version of the package. The suites from Ubuntu's default repositories are normally VERSION, VERSION-updates, VERSION-security, VERSION-backports and VERSION-proposed, where VERSION is your Ubuntu release codename, e.g. xenial for 16.04 or bionic for 18.04.

Multiple mentions of the same suite seem to indicate that multiple architectures of the same package version are available from that suite (usually 32/64 bit). About your two different machines, could it be that one is 32 bit only and one is 64 bit with 32 bit multi-arch support?

now apparently indicates that you have a local, cached version of the package, corresponding to a line with /var/lib/dpkg/status in the output of apt policy. It is present on all installed packages too.

Example with some random packages:

$ apt list zenity zenity-common zziplib-bin
Listing... Done
zenity/xenial,now 3.18.1.1-1ubuntu2 amd64 [installed,automatic]
zenity-common/xenial,xenial,now 3.18.1.1-1ubuntu2 all [installed,automatic]
zziplib-bin/xenial-updates,xenial-security 0.13.62-3ubuntu0.16.04.2 amd64

$ apt policy zenity zenity-common zziplib-bin
zenity:
  Installed: 3.18.1.1-1ubuntu2
  Candidate: 3.18.1.1-1ubuntu2
  Version table:
 *** 3.18.1.1-1ubuntu2 500
        500 http://ftp.uni-stuttgart.de/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
zenity-common:
  Installed: 3.18.1.1-1ubuntu2
  Candidate: 3.18.1.1-1ubuntu2
  Version table:
 *** 3.18.1.1-1ubuntu2 500
        500 http://ftp.uni-stuttgart.de/ubuntu xenial/main amd64 Packages
        500 http://ftp.uni-stuttgart.de/ubuntu xenial/main i386 Packages
        100 /var/lib/dpkg/status
zziplib-bin:
  Installed: (none)
  Candidate: 0.13.62-3ubuntu0.16.04.2
  Version table:
     0.13.62-3ubuntu0.16.04.2 500
        500 http://ftp.uni-stuttgart.de/ubuntu xenial-updates/universe amd64 Packages
        500 http://ftp.uni-stuttgart.de/ubuntu xenial-security/universe amd64 Packages
     0.13.62-3 500
        500 http://ftp.uni-stuttgart.de/ubuntu xenial/universe amd64 Packages