4 Aug
2009
4 Aug
'09
18:30
Kyrill Detinov wrote:
Sunday 02 August 2009
Hello.
Is there any simple way (maybe script) to delete obsolete versions of packages from local osc package cache directory?
Here's a very simple draft I wrote more as an experiment in bash progress indicators than anything else. Its grossly inefficient and probably shows off lots of bad bash habits but it sortof works and might be a good start for what you are thinking of. It assumes the directory you want to clean is /var/tmp/osbuild-packagecache. It uses find & rpm to create a whole bunch of text files which it then sorts to decide which files to keep. It runs much much faster if you run it in --quiet or --noprogressind mode. Regards, MasterPatricko