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

<No Subject>



Cc: 
Bcc: 
Subject: Re: Get list of installed packages
Reply-To: 
In-Reply-To: <52F388E4.6000500@gmail.com>

On 06/02/14, Tino Sino (robottinosino@gmail.com) wrote:
> 
> It has been asked before, but with different answers, e.g.:
> 1) dpkg-query --list | awk '/^ii +/ { print $2; }'
> 2) dpkg --get-selections | cut -f 1
> 3) ... etc ...
> Given that the output is the same:
> $ diff \
>        <(dpkg --get-selections | cut -f 1) \
>        <(dpkg-query --list | awk '/^ii +/ { print $2; }') \
>   && echo same-output
> same-output
> I wonder, what's the golden way to do this and why?

Don't remember where I found this, but it's useful for reinstalling:

dpkg --get-selections \* | grep -e install -e hold | grep -v deinstall > ~/got-selections-$(date +%Y%m%d)'

-- 
JohnRChamplin@wowway.com
====================================================
GPG key 1024D/99421A63 2005-01-05
EE51 79E9 F244 D734 A012 1CEC 7813 9FE9 9942 1A63
gpg --keyserver subkeys.pgp.net --recv-keys 99421A63

Attachment: signature.asc
Description: Digital signature


Reply to: