> >> How can I find out what version of a package I have currently installed > > > dpkg -l|grep libc > > This is a solution, but not perfect, 'cause sometimes the package name > gets truncated, e.g.: > > ii libcupsys2-gnu 1.1.20final+rc Common UNIX Printing System(tm) - libs
here is the answer to the 'truncation'.
doing:
COLUMNS=139 dpkg -l
this sets the env var COLUMNS temporarity to 139 for this command.
Kevin Mark
> > How can I find out what version of a package I have currently > > installed (e.g., glibc)? > > apt-cache policy foo > dpkg -l foo > zcat /usr/share/doc/foo/changelog.Debian.gz | \ > sed -n -e 's/^[^\x28]*[\x28]//' -e 's/\x29.*//' -e '1p'
$ COLUMNS=500 dpkg -l | awk '{print $1 " " $2 "_" $3 "\n" }' | grep libc ii glibc-doc_2.3.2.ds1-13 ii libc6_2.3.2.ds1-13 ii libc6-dev_2.3.2.ds1-13 ii libcap1_1.10-14 ii libcdparanoia0_3a9.8-11 ii libcomerr2_1.35-6 ii libconsole_0.2.3dbs-54 ii libcroco2_0.5.1-1 ii libcupsimage2_1.1.20final+rc1-3 ii libcupsys2-gnutls10_1.1.20final+rc1-3 ii libcurl2_7.11.2-1
T
documented on: 2004.08.29