[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to check that if a package is installed?

On Mi, 01 dec 10, 14:29:34, Bob Proulx wrote:
> Andrei Popescu wrote:
> > You don't even need the 
Do you read minds? This should have been "... the grep", but I stopped 
to check the man page and then forgot to remove it ;)

> > 'dpkg -l' is fine as well, if used properly ;)
> > 
> > $ dpkg -l tofrodos
> > No packages found matching tofrodos.
> However that doesn't handle packages that had been installed but are
> now removed but not purged leaving configuration files behind.

You still need the grep, what I meant was that 'dpkg -l <package>' 
should be the same as 'dpkg --status <package>'[1], but many people tend 
to forget that -l takes a pattern and prefer to use grep to search for 
the needed package.

[1] they are actually both calls to dpkg-query(1)

Offtopic discussions among Debian users and developers:

Attachment: signature.asc
Description: Digital signature

Reply to: