Re: rm and old rpms

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

 



Frank Murphy wrote:
> Looking for a method to remove old rpms from a local repo using
> mtime, as *fcX cannot be used in this instance.
>
> It will end up being run as a daily cron job.

I don't know what the end goal is, but you may have better luck using
repomanage to prune old packages, yet keep the last N versions.  If
you have a local repository you want to keep from growing, that's
often preferable to just removing old packages.

> Does this look ok?
> find /path/local.repo/*.rpm  -mtime +200 -exec rm {} \;

I'm a fan of xargs and avoiding -exec when possible, since it spawns a
new shell process for each file.  But for this particular usage, if I
wasn't using repomanage (or another rpm specific tool), I'd use
tmpwatch rather than roll my own solution with find.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It behooves every man who values liberty of conscience for himself, to
resist invasions of it in the case of others: or their case may, by
change of circumstances, become his own.
    -- Thomas Jefferson

Attachment: pgp98FnGYUeDs.pgp
Description: PGP signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux