On Tue, 07 Oct 2014, Abdelkader Belahcene wrote: > I am not satisfied by my script. I sorted the package in descending > order and kept the first and deleted others. this seemed correct,
It's not correct. You must sort on the basis of version number, which does not necessarily increase lexically. > When there is no special character like + and extra b1, no problem, just > with that name, which is I think , a temporary name. +b1 usually indicates a binary rebuild of a source package, and when we have them in the archive, you want them. > please if anyone has a better script or idea, here are my script, I > sort with python3, cause shell didn't do the task well ?? the second > with awk/ The proper way to clean an archive is to remove package versions which are both: 1) Not present in the Packages file referenced by the Release file that you're using 2) Have a version number less than the version in the Packages file. #2 is optional, but will keep you from churning if your Packages file is slightly outdated. apt-mirror should really have a function to do this sort of cleaning for you; if it doesn't, please consider extending it to have one in collaboration with apt-mirror upstream. -- Don Armstrong http://www.donarmstrong.com It's brief and bright, dear children; bright and brief. Delight's the lightning; the long thunder's grief. -- John Frederick Nims "Poetry in Motion" p31 -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141007162719.gf6...@teltox.donarmstrong.com