Clean the rpm mirror


(Stéphane de Labrusse) #1

I saw that the rpm mirror gets a lot of old rpm. this is for example nethforge : http://packages.nethserver.org/nethserver/7.3.1611/nethforge/x86_64/Packages/

it is possible to clean it easily by a cron, first : yum install yum-utils

then

#! /bin/bash
rm -f $(repomanage --o --keep=2 /path/2/NethServer/7/)
rm -f $(repomanage --o --keep=2 /path/2/NethServer/6/)

you can test it by replacing the command rm by ls or mv/cp to test it first :slight_smile:

Ok it is just cosmetic, good weekend


(Michael Träumner) #2

Hi Stephane,
thanks for it.
I think it’s a howto, should we move it to HowTo section?

/cc @alefattorini


(Giacomo Sanchietti) #3

The mirrors should be a 1-to-1 copy of the master mirror.

Please note that a repository can contain multiple release of the same RPM for historical reasons and for supporting RPM downgrade.


(Alessio Fattorini) #4

Thanks for the heads-up. Done


(Stéphane de Labrusse) #5

Centos keeps 5 versions of rpm…ns aims to be full centos compatible

:slight_smile: