On Fri, Nov 28, 2003 at 04:40:17AM -0800, Karsten M. Self wrote: > Why not? 'apt-get autoclean' will remove just _older_ versions of > archives. Not sure if there's a way to explicitly keep, say, no more > than tree prior versions of a package, but I could see that being > useful...
I use this scripts to move all my downloaded .debs into directories arranged by date they were obsoleted: "x"::::: dt=`date +"%y%m%d_%H%M%S"` sub=dists/latest/binary-i386 cd /mnt/apt cd latest; if [[ `ls *%* 2>/dev/null | wc -l` -ne 0 ]]; then for x in *%*; do mv $x ${x/[0-9]\\%3a/}; done; fi; cd .. echo Scanning Packages... dpkg-scanpackages latest /dev/null > $sub/Packages grep -Ex "Filename: latest/.+" $sub/Packages | sed "s/Filename: latest\/\(.*\)/\1/" > old/L$dt pushd $sub rm Packages.gz gzip Packages popd mv latest $dt mkdir latest for x in `cat old/L$dt`; do mv $dt/$x latest; done if [[ `ls $dt | wc -l` -eq 0 ]]; then rm -r $dt; else echo $dt `ls $dt | wc -l`; mv $dt old; fi "u"::::: mv /var/cache/apt/archives/*.deb /mnt/apt/latest apt-get clean /mnt/apt/x apt-get update -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]