Sadly the dependency list is not translated into human readable form. The dependencies are in the form:
packagename (compareOp value)
compareOp
is one of the following numbers:
0 NoOp
1 LessEq
2 GreaterEq
3 Less
4 Greater
5 Equals
6 NotEquals
possibly added with
16 OR
OR
means, that this dependency can be satisified by the following dependency as well, so only one of the "or"ed dependencies needs to be there.
NoOp
has no value
, hence you see those (0 (null))
outputs, as this is, how a NULL
string is printed by the C library. Well, yes, there is absolutely no translation!
And I did not find any way to find out, which of the dependencies are mandatory, suggested, conflicts and so on. To get all information, at first run
apt-cache depends PACKAGE
to list the dependencies in human form. Sadly this lacks the details. And then find the details about dependencies with
apt-cache showpkg PACKAGE
Perhaps somebody else finds a better way (or creates a tool) to list the dependencies of a package with all needed gory detail in human readable form.
I tried to put this together into some script called showdeps
, which seems to do the job. It is called like this: showdeps package..
The output is very similar to apt-cache depends package..
, but includes a bit more detail.
As a reference I copy it here, original is at https://github.com/hilbix/bashy/blob/debian/showdeps
#!/bin/bash
export LC_ALL=C.UTF-8
showdep()
{
export PKG="$1"
gawk '
NR==1,/^Dependencies:/ { next }
/^Provides:/,0 { next }
END { if (NR==0) { print "No input, package " ENVIRON["PKG"] " not found?"; exit(1); } }
BEGIN {
OP[0] = "";
OP[1] = "<=";
OP[2] = ">=";
OP[3] = "<<";
OP[4] = ">>";
OP[5] = "==";
OP[6] = "!=";
for (a in OP) OP[a+16]=OP[a];
}
{
delete pkg;
delete cmp;
j = 0;
for (i=3; i<=NF; i+=3)
{
pkg[j] = $i;
x = $(i+1); sub(/^[(]/,"",x);
y = $(i+2); sub(/[)]$/,"",y);
x = (x in OP) ? OP[x] : "### OOPS, unknown >>>" x "<<<";
if (x=="")
if (y=="(null)")
y = "";
else
x = "???OOPS???";
cmp[j] = x y;
j++;
}
ver=$1;
gsub(/'\''/,"",ver);
exec="apt-cache depends \"$PKG\"='\''"ver"'\''";
j = 0;
while (exec | getline)
{
printf "%s\t%s\t%s%s\n", ENVIRON["PKG"], ver, $0, ($1~/:$/) ? "\t(" cmp[j++] ")" : "";
}
close(exec)
print ""
}
' <(apt-cache showpkg "$1")
}
for p
do
showdep "$p"
done
This is free software with free as in free speech, free beer and free baby. No warranty, use at your own risk, and you cannot hold me liable for any error in it.
Example output:
$ showdeps gedit
gedit 3.10.4-0ubuntu4 gedit
gedit 3.10.4-0ubuntu4 Depends: libatk1.0-0 (>=1.12.4)
gedit 3.10.4-0ubuntu4 Depends: libc6 (>=2.4)
gedit 3.10.4-0ubuntu4 Depends: libcairo2 (>=1.2.4)
gedit 3.10.4-0ubuntu4 Depends: libenchant1c2a (>=1.6.0)
gedit 3.10.4-0ubuntu4 Depends: libgdk-pixbuf2.0-0 (>=2.22.0)
gedit 3.10.4-0ubuntu4 Depends: libgirepository-1.0-1 (>=0.9.3)
gedit 3.10.4-0ubuntu4 Depends: libglib2.0-0 (>=2.38)
gedit 3.10.4-0ubuntu4 Depends: libgtk-3-0 (>=3.10)
gedit 3.10.4-0ubuntu4 Depends: libgtksourceview-3.0-1 (>=3.10.0)
gedit 3.10.4-0ubuntu4 Depends: libpango-1.0-0 (>=1.14.0)
gedit 3.10.4-0ubuntu4 Depends: libpeas-1.0-0 (>=1.1.0)
gedit 3.10.4-0ubuntu4 Depends: libx11-6 ()
gedit 3.10.4-0ubuntu4 Depends: libxml2 (>=2.7.4)
gedit 3.10.4-0ubuntu4 Depends: libzeitgeist-2.0-0 (>=0.9.9)
gedit 3.10.4-0ubuntu4 Depends: gedit-common (>=3.10)
gedit 3.10.4-0ubuntu4 Depends: gedit-common (<<3.11)
gedit 3.10.4-0ubuntu4 Depends: gsettings-desktop-schemas ()
gedit 3.10.4-0ubuntu4 Depends: python3-gi (>=3.0)
gedit 3.10.4-0ubuntu4 Depends: python-gi-cairo (>=3.0)
gedit 3.10.4-0ubuntu4 Depends: gir1.2-peas-1.0 ()
gedit 3.10.4-0ubuntu4 Depends: iso-codes ()
gedit 3.10.4-0ubuntu4 Suggests: gedit-plugins ()
gedit 3.10.4-0ubuntu4 Recommends: gir1.2-gtksource-3.0 ()
gedit 3.10.4-0ubuntu4 Recommends: zenity ()
gedit 3.10.4-0ubuntu4 zenity:amd64
gedit 3.10.4-0ubuntu4 Recommends: yelp ()
gedit 3.10.4-0ubuntu4 Breaks: gedit-plugins (<<2.91)
gedit 3.10.4-0ubuntu4 Breaks: gedit-plugins:amd64 (<<2.91)
gedit 3.10.4-0ubuntu4 Conflicts: gedit:amd64 ()
500 and 100 are the priority numbers. To learn more about them, I recommend man apt_preferences
. 500 corresponds to installable, 100 means installed.
From the man page:
If the target release has not been specified then APT simply assigns
priority 100 to all installed package versions and priority 500 to all
uninstalled package versions.
The ***
just means installed, as far as I know. Once it has been installed, you see both 500 and 100, corresponding to the version in the archives and the locally installed version respectively.
Best Answer
now
refers to the currently installed version, that’s all. When you see it on its own, it means that the installed package isn’t in the configured repositories (usually because an upgrade is available, as is the case above). Otherwise it’s listed alongside the repositories containing the package.It’s equivalent to
/var/lib/dpkg/status
inapt-cache policy
’s output.See What is the format of the "apt search" output on debian / ubuntu? for more details.