yum leaving multiple versions installed

Ville Herva vherva at viasys.com
Sun Feb 5 19:26:49 UTC 2006


On Sun, Feb 05, 2006 at 02:00:21PM -0500, you [Jim Cornette] wrote:
> dups="gpg-pubkey|kernel"
> echo Starting Duplicate RPM Search.
> echo ...
> rpm -aq --queryformat "%{NAME}-%{ARCH}\n" | sort | uniq -c | grep -v -E 
> " *1 "|awk '$1 > 1
> { print $2 } ' | egrep -v $dups
> echo Finished With Search.
> echo

I small note: I think egrep -v "gpg-pubkey|kernel" will also match something
like "fookernel" if such package name will ever appear. 

Perhaps something like

 egrep "^ +[0123456789]+ +($dups)$"

would be safer. Or then it is overkill :). I don't know :)


-- v -- 

v at iki.fi




More information about the fedora-test-list mailing list