Re: Find installed contrib and non-free packages
On Thu, Jun 12, 2008 at 4:06 PM, W. Martin Borgert <debacle@debian.org> wrote:
> On Thu, Jun 12, 2008 at 11:38:33AM +0200, Filip Husak wrote:
>> I think the following command resolves your problem:
>>
>> for pkg in `dpkg -l | grep ii | awk '{print $2}'` ; do if [ `apt-cache
>> show $pkg | grep 'contrib\|non-free' | wc -l` -ne 0 ]; then echo $pkg;
>> fi; done
>
> You should grep for "^Filename: pool/\(contrib\|non-free\)/" to
> prevent false positives. And: Packages that have been installed
> from non-Debian apt sources or via dpkg --install are missed.
grep -v '^Filename: pool\/main\/' will get everything not in main,
which is the OP's intention, IIRC.
(unless backports is supported by Debian security)
-Jim P.
Reply to: