for RPM in `rpm -qa --qf "%{NAME}\n" | sort -u` ; do
  if [ "`rpm -q --whatrequires $RPM`" == "no package requires $RPM" ] ;
then
    echo "$RPM"
  fi
done

On Tue, Oct 11, 2011 at 2:22 PM, Alex Aminoff <[email protected]> wrote:

>
> This is surprisingly more difficult than I expected.
>
> Is there a simple way to ask a package management system (rpm, yum, or
> apt) to list those packages which are not themselves dependencies for
> any other package?
>
> I could ask for the dependencies of each package and then write perl
> code to figure it out, but I don't think I should have to.
>
>  - Alex Aminoff
>    BaseSpace.net
>
>
> _______________________________________________
> bblisa mailing list
> [email protected]
> http://www.bblisa.org/mailman/listinfo/bblisa
>
_______________________________________________
bblisa mailing list
[email protected]
http://www.bblisa.org/mailman/listinfo/bblisa

Reply via email to