[TriLUG] Re: Disk cleanup

James Manning trilug at sublogic.com
Mon Mar 18 16:19:06 EST 2002


[John Matthews]
> I'm almost sure there is a way to get RPM to sort all the packages
> installed by size, but I have no clue how to do it. Perhaps the RPM
> gurus can help on that front.

ala Ben Reed's talk, --queryformat (or --qf) will let you fetch
out whatever you want, including the SIZE macro.  Hence:

rpm -qa --qf '%{SIZE} %{NAME}\n'|sort -n

(passed on from katzj, passed on from spot, etc.)

(add -r to the sort if you want the opposite order)

I do descending by size with the useless script as well, fwiw.

http://www.sublogic.com/scripts/useless.pl

James
-- 
James Manning <jmm at sublogic.com>
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4



More information about the TriLUG mailing list