How to prune out old rpm files from fedora repository?
Todd Zullinger
tmz at pobox.com
Fri Feb 9 19:34:27 UTC 2007
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=fedora
--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
======================================================================
Drugs may lead to nowhere, but at least it's the scenic route.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 542 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20070209/3ec180d0/attachment-0001.sig>
More information about the fedora-list
mailing list