- To: slug@xxxxxxxxxxx
- Subject: Re: [SLUG] easiest way to check if a .deb is installed?
- From: "Lindsay Holmwood" <lindsay@xxxxxxxxxxxxxx>
- Date: Sat, 7 Jun 2008 17:44:16 +1000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=ITq4cZzuYIBF5/GlxBPmE0v8yHrPfwRllEqi15QNdK0=; b=X2payG9Al4lEQ4W7KTnu6puRYWE3JGKx9gMps0EAsqjWzY0j7EojViJrwvvHTtq+X2 01k3w462UGoX1y/ojd7TSK3IXh113+2V9GPdsd7504ld4ne3aYsKLUMbnPos2jBOlOfn 7xISkNxOm45BXFIEHuRCU2llbnPrQJ+0Mrr7E=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references:x-google-sender-auth; b=tyC7lQIkBSBydzV5FTmm4rhFzU9dYUAvfFs3arP8lHaHYLwQtKbYfN2XRDsYq5oA00 SLgUkhY2n2TsaYvCxc8ySHQ6LJM6gII3M0tZ8vz4poOi2yWgr4TtlI/fSle/MIV8pzqS bZthAkpGfumD8hRVlTVqmsNDyX4q3L58fiidQ=
On Sat, Jun 7, 2008 at 4:21 PM, Sonia Hamilton <sonia@xxxxxxxxxxxx> wrote:
> What's the easiest accurate way to check if a .deb has been installed
> on a system, from a script?
>
> At the moment I'm using `dpkg -l | grep ...`, which is messy.
dpkg -s $package
Return code is 0 for installed, 1 for not installed.
Lindsay
--
http://slug.org.au/ (the Sydney Linux Users Group)
http://holmwood.id.au/~lindsay/ (me)