Re: How to prune out old rpm files from fedora repository?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

Attachment: pgpzlvSbwtbsD.pgp
Description: PGP signature

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux