Paul Johnson wrote:
I run a server that has updates of RPMs I build for our lab. The packages directory is getting too big and fat with 10 or 15 versions of some RPMS. I wonder if somebody has a script that can clean out the older versions? Something that cooperates with the createRepo script?
I've used the repomanage tool to do this. Something like this for one of my local repositories:
repomanage --old $repo | while read package; do dir=$(dirname "$package") archive="$topdir/archive/$(basename $repo)" [ ! -d $archive ] && mkdir -p $archive mv "$package" $archive done
You might also find some useful snippets in the scripts used to push Fedora Extras packages (particularly RepoPrune.py):
http://cvs.fedora.redhat.com/viewcvs/extras-buildsys/utils/pushscript/?root=...