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

Re: Find installed contrib and non-free packages



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.


Reply to: