[Mageia-discuss] How to prune urpmi-proxy cache?
Maarten Vanraes
alien at rmail.be
Mon Mar 12 07:49:42 CET 2012
Op maandag 12 maart 2012 02:07:46 schreef Morgan Leijström:
> Cauldron updates makes urpmi-proxy cache grow pretty big.
>
> Any idea how to automatically or semi automatically prune
> /var/cache/urpmi-proxy ?
>
> Something along the line
> "delete all but the latest versions of same package"
>
>
> Maybe there is some tool used for similar task that can be used/hacked?
>
>
> Another idea is to compare contents of urpmi-proxy cache against mirror and
> delete files not present on mirror. (especially thinking of cauldron
> release)
>
>
> ( About urpmi-proxy
> https://wiki.mageia.org/en/Urpmi-proxy
> https://forums.mageia.org/en/viewtopic.php?f=8&t=1770
> )
While this is a feature not present yet, but on the TODO file of urpmi-proxy:
I've been thinking along these lines:
1) delete older versions of the same file in the same directories
2) give a configurable max size and delete the older files if the size is
reached
3) give a configurable time limit and delete all files older than this one (in a
cronjob)
that being said, there are a couple of things you can do:
A) do a find with a time limit and remove the older files
B) rsync with a mirror (with --delete option)
C) rsync with a mirror (but find some option to only delete the removed files
and nothing else)
for A) i likely can make a quick shell script to do that, but i think rsyncing
with could be the quickest way...
which would you prefer?
More information about the Mageia-discuss
mailing list