Listing installed packages in Debian Sarge

Giles Orr gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Thu Nov 16 12:59:34 UTC 2006


Hi Meng.

Try this:

  # dpkg -l | grep -v "^rc"

There may be other package states this doesn't account for, but on my
system the only packages that show up in the listing as uninstalled
are ones that are "[R]emoved" and have "[C]onfig-files" so this trick
is adequate.  Another alternative that would also remove the standard
header (good if you want to feed the list into another text parser)
would be this:

  # dpkg -l | grep "^i"

You might prefer this.

On 11/14/06, Meng Cheah <meng-D1t3LT1mScs at public.gmane.org> wrote:
> Hi
>
> I'm checking out a Debian Sarge system.
> I'm running the commands below to find out what packages are installed.
>
> apt-cache pkgnames --installed
> less /var/lib/dpkg/available
> dpkg -l
>
> Any suggestions, alternatives or gotchas as to the above?
> I understand that dpkg -l displays installed packages as well as removed
> packages.
> How do I show only the installed packages?
>
> Thanks in advance.
>
> Meng Cheah
> --
> The Toronto Linux Users Group.      Meetings: http://gtalug.org/
> TLUG requests: Linux topics, No HTML, wrap text below 80 columns
> How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists
>


-- 
Giles
http://www.gilesorr.com/
gilesorr-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list