Delete replaced packages on a local mirror

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am maintaining a private mirror for some Linux distributions. Now that the Fedora project have transfered Fedora Core 1 updates to the Fedora Legacy project I'd like to clean my Fedora Core 1 mirror by deleting some replaced packages.

Here is an example: These are the gaim packages that were mirrored in the last few months. The only package I would like to keep is the latest and greatest (here: gaim-0.82-0.FC1.i386.rpm) to save disk space:

My local directory: /var/ftp/pub/mirror/fedora/linux/core/updates/1/i386

-rw-r--r-- 1 root ftp 2587910 Feb 16 2004 gaim-0.75-1.3.0.i386.rpm
-rw-r--r-- 1 root ftp 2693830 Apr 5 20:03 gaim-0.76-1.FC1.i386.rpm
-rw-r--r-- 1 root ftp 2718003 May 19 15:10 gaim-0.77-2.FC1.i386.rpm
-rw-r--r-- 1 root ftp 2970376 Jun 10 19:41 gaim-0.78-1.FC1.i386.rpm
-rw-r--r-- 1 root ftp 3160982 Jun 25 04:10 gaim-0.79-0.FC1.i386.rpm
-rw-r--r-- 1 root ftp 3274548 Jul 19 18:04 gaim-0.80-1.FC1.i386.rpm
-rw-r--r-- 1 root ftp 3330601 Aug 6 22:18 gaim-0.81-0.FC1.i386.rpm
-rw-r--r-- 1 root ftp 3330900 Aug 17 22:46 gaim-0.81-1.FC1.i386.rpm
-rw-r--r-- 1 root ftp 3355334 Aug 26 04:46 gaim-0.82-0.FC1.i386.rpm


I am looking for a script (or pointers to some related information) which does just that fully automated and ***savely*** for every package: delete old/replaced packages and keep only the latest (including source packages, debugging packages and header files).

While the above example is simple, there seem to be some more complex cases (just to name two of them):

-rw-r--r-- 1 root ftp 1192029 Feb 13 2004 XFree86-ISO8859-14-100dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1054339 Feb 13 2004 XFree86-ISO8859-14-75dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1238312 Feb 13 2004 XFree86-ISO8859-15-100dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1084089 Feb 13 2004 XFree86-ISO8859-15-75dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1184809 Feb 13 2004 XFree86-ISO8859-2-100dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1051141 Feb 13 2004 XFree86-ISO8859-2-75dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1233346 Feb 13 2004 XFree86-ISO8859-9-100dpi-fonts-4.3.0-55.i386.rpm
-rw-r--r-- 1 root ftp 1082046 Feb 13 2004 XFree86-ISO8859-9-75dpi-fonts-4.3.0-55.i386.rpm


or

-rw-r--r-- 1 root ftp 133378 Dec 4 2003 rsync-2.5.7-2.i386.rpm
-rw-r--r-- 1 root ftp 133636 Aug 19 21:03 rsync-2.5.7-5.fc1.1.i386.rpm
-rw-r--r-- 1 root ftp 133557 Jun 9 15:09 rsync-2.5.7-5.fc1.i386.rpm


The XFree86* packages are of the same version/release while the rsync* packages have changed the naming convention.

Since the official public mirrors keep those old packages stored, mirroring with the option to delete locally stored packages which are not stored on the public mirrors anymore does not help.

Thanks, David




[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux