Re: Checking what's installed
On Tue, 26 Aug 2003 10:40:22 +0900
Nick Hastings <hastings@bmail.kek.jp> wrote:
> I beg to differ:
>
> hastings@twofish ~ 9% dpkg -l | grep -v ^ii | wc
> 126 952 8173
>
> Seems there are 126 that are not both installed and desired. It shows
> all the packages that it knows about.
The man dpkg man page agrees with you more than with me:
dpkg -l | --list package-name-pattern ...
List packages matching given pattern. If no pack
age-name-pattern is given, list all packages in
/var/lib/dpkg/available.
On the other hand, here's what it looks like on one of my machines:
ronin@cypher:~$ dpkg -l |wc
163 1323 11470
ronin@cypher:~$ dpkg -l |grep -v ^ii |wc
5 12 321
ronin@cypher:~$ dpkg -l |grep -v ^ii
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err:
uppercase=bad)
||/ Name Version Description
+++-==============-==============-==========================================
In other words, on my machine dpkg reports only the installed packages.
But that's NOT all the packages in .../available:
cypher:/home/ronin# dselect update
Hit http://security.debian.org stable/updates/main Packages
Hit http://security.debian.org stable/updates/main Release
Reading Package Lists... Done
Building Dependency Tree... Done
Merging Available information
Replacing available packages info, using /var/cache/apt/available.
Information about 779 package(s) was updated.
cypher:/home/ronin# dpkg -l |wc
163 1323 11470
cypher:/home/ronin#
I'm not sure why that is.
Kevin
Reply to: