Thanks, saved me a ton of work! Steve On Oct 28, 11:03am, Stefan Seyfried wrote:
On Tue, 27 Oct 2009 20:53:28 -0700 wormey@eskimo.com (Space Case) wrote:
Does anyone have a script that will reduce the number of versions of each package down to one or two?
I used this one to clean up the osc build package cache, back when I was young and stupid and still test-building against FACTORY ;)
seife@strolchi:~> cat bin/clean-osbuild-packagecache.sh #!/bin/sh
DIR=$1 if [ -z "$DIR" ]; then echo "please give directory!" exit 1 fi
cd $DIR PKGS=$(ls |sed 's/-[[:digit:]].*-[[:digit:]].*\.rpm//'| sort -u)
for i in $PKGS; do ls -t ${i}-[0-9]*-[0-9]*.rpm|tail -n +2|xargs --no-run-if-empty rm done #####
This actually goes for the timestamp of the Packages IIRC and it was not 100% perfect, but it served my purpose (reducing the amount of disk space wasted by osc) well. -- Stefan Seyfried
"Any ideas, John?" "Well, surrounding them's out." -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org }-- End of excerpt from Stefan Seyfried
-- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-factory+help@opensuse.org