Re: Getting a list of installed packages
Moritz Schulte <email@example.com> wrote:
>Robert Guthrie <firstname.lastname@example.org> writes:
>> I'm using this command:
>> dpkg -l * | egrep "^ii" | grep -i kde
>It seems that 'dpkg -l' (without the pattern) lists all installed
>packages, so you don't need to filter the installed packages out.
That's not strictly true; it doesn't list uninstalled packages, but it
will list packages that are half-installed, unconfigured, etc., as well
as held packages and packages marked with some action other than
"install". The command above only lists packages that are installed and
marked to install new versions as they appear.
The * is bogus though - it will expand to every filename in the current
directory, which might well not be what you want. Unless you really do
want to expand it, use one of these instead:
dpkg -l '*'
dpkg -l "*"
dpkg -l \*
Colin Watson [email@example.com]