for RPM in `rpm -qa --qf "%{NAME}\n" | sort -u` ; do <div> if [ "`rpm -q --whatrequires $RPM`" == "no package requires $RPM" ] ; then </div><div> echo "$RPM"</div><div> fi</div>
<div>done</div><div><br><div class="gmail_quote">On Tue, Oct 11, 2011 at 2:22 PM, Alex Aminoff <span dir="ltr"><<a href="mailto:alex@basespace.net">alex@basespace.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
This is surprisingly more difficult than I expected.<br>
<br>
Is there a simple way to ask a package management system (rpm, yum, or<br>
apt) to list those packages which are not themselves dependencies for<br>
any other package?<br>
<br>
I could ask for the dependencies of each package and then write perl<br>
code to figure it out, but I don't think I should have to.<br>
<br>
- Alex Aminoff<br>
BaseSpace.net<br>
<br>
<br>
_______________________________________________<br>
bblisa mailing list<br>
<a href="mailto:bblisa@bblisa.org">bblisa@bblisa.org</a><br>
<a href="http://www.bblisa.org/mailman/listinfo/bblisa" target="_blank">http://www.bblisa.org/mailman/listinfo/bblisa</a><br>
</blockquote></div><br></div>