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

Re: yum cleanup



Bill Davidsen wrote, On 07/25/2009 08:32 PM:
I have been running yum with keepcache=1 to save rpms I install. Being busy I seem to have gotten several versions of some packages in /var/cache/yum. Is there a command which will delete anything listed in obsoletes without losing my copy of the most recent? I create a local archive of recent rpms to be nice to my network.

Using 'yum clean' does too much. :-(

repomanage -c -k 2 --old path/to/cacheOfRPMs/ > removethese.txt
#and then (after sanity checking removethese.txt)
for i in `cat removethese.txt`;do rm $i;done

might get you close.
Note, AFAIK the repomanage command does NOT have to be ran against a YUM repo.

Note 2, using -k 1 keeps 1 vs -k 2 keeping 2.

--
Todd Denniston
Crane Division, Naval Surface Warfare Center (NSWC Crane)
Harnessing the Power of Technology for the Warfighter


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