Hello All,
At my $WORK we have lots of in-house applications used to support the
services we offer to customers and we deploy these to servers as RPMS.
This works well for us except we have thousands of obsolete packages
in our Yum repository that need to be cleaned up. What I would like to
achieve is to keep the latest version + the last 3 revisions of a
package and delete the older revisions.
I was attempting to do this based on file timestamps but they are not
reliable and in some cases packages were restored from backup in a way
that did not preserve timestamps. So I am investigating writing a Perl
script to do this but it is far from trivial due to the vast variety
of version and release strings used. And there are certain situations
in which the version strings are completely ambiguous (even to me)
but, even if those have to be handled manually, then great time
savings in cleaning up the rest automatically can still be achieved.
So, before I start (re)inventing this particular wheel, I thought I
would check with the folks on this list since I cannot be the only
person with this problem. Are there any ready to use tools available
to trim down an overwheight RPM repository by deleting obsolete
packages?
Many thanks!
Fred.