Sponsored Content
Full Discussion: RPM Repo Cleanup
Top Forums UNIX for Advanced & Expert Users RPM Repo Cleanup Post 303009523 by geoeldsul on Friday 15th of December 2017 10:19:36 AM
Old 12-15-2017
RPM Repo Cleanup

Greetings all,

I have inherited this offline Red Hat YUM repo that contains over 42000 packages. You read that right. There are 71 kernels alone. The process that I've inherited has us reposync on an Internet-connected-server then sneaker-net the delta to our offline repo where we do a yum --update.

The offline repo is massive and takes to much time just to update.

I'm trying to develop a script that will process the offline repo and keep perhaps the most recent 5 or 6 packages. For example, if I have:

kernel-version-1 through kernel-version-71. I want to strip out and keep kernel-version-67 through kernel-version 71. Then, of course, there is all the other packages like openssl, samba, poppler, etc etc etc.

If been experimenting on the command line with what ls and stat can do using their time arguments and along with the standard processing that grep and awk can do throwing in an xargs here and there, but haven't hit upon the golden nugget yet that makes me feel comfortable with proceeding.

I'm worried about accidentally removing critical RPM dependencies so that is why I want to keep 5 or 6 versions (maybe more) back and if there are less than 5 or 6 versions ... say only 3 ... then keep all those 3.

I've also thought about exploring what the rpm and yum commands can do by having them tell me what their dependencies are then keep those dependencies along with the RPM they support while at the same time making sure those RPMs are the most recent 5 or 6.

Any ideas or thoughts on approaching this issue?

---------- Post updated at 10:19 AM ---------- Previous update was at 09:58 AM ----------

Umm. Just stumbled across something called repomanage. This might be the ticket. I will explore this also.
 

10 More Discussions You Might Find Interesting

1. Linux

Failed dependencies of rpm / how does RPM check for ?

Hey, I've a problem installing a package. rpm -ivh brings the errors: libjvm.so is needed by libverify.so is needed by But I have installed the Java SDK like requested and the files are on the disk. But I have no idea how to find out, why rpm cann't find them. I have also... (2 Replies)
Discussion started by: mod
2 Replies

2. Linux

Converting source rpm to binary rpm

Hi, I need to install an rpm file,but I only have '.src.rpm' version of it. I want to convert it to a binary rpm. so I tried this rpm --rebuild somethin.src.rpm But I am gettin '--rebuild:Invalid option' as output Is there another way to rebuild source rpm.? Thanks in... (2 Replies)
Discussion started by: eamani_sun
2 Replies

3. SuSE

How to install .src.rpm ? ( source rpm )

Hi, I have got few RPM's from rpmfind.net ( mainly gcc ). But it seems to be src files instead of the image. so I think we have to build the src files according to target machine using rpmbuild. Can any one help me with 1) Various options of rpm build that have to be taken care 2)... (3 Replies)
Discussion started by: Sivaswami
3 Replies

4. Shell Programming and Scripting

Extract RPM name from path to .rpm file

It's the end of the day and I just can't get my head around this. I'm trying to extract just the name of the RPM from the path to a .rpm file. So from: /home/me/rpm/RPMS/i386/nagios-our-plugins-1.2-6.i386.rpmI need to extract 'nagios-our-plugins'. I can't get the awk syntax right: awk '{... (5 Replies)
Discussion started by: aussieos
5 Replies

5. Shell Programming and Scripting

How to make RPM not write to RPM database if RPM fails to deploy?

How to make RPM not write to RPM database if RPM fails to deploy? IE I create an rpm spec file that contains the following if then exit 1 fi My rpm will fail at deployment, but if I do rpm -qa , I can see the rpm in the rpm db (3 Replies)
Discussion started by: 3junior
3 Replies

6. UNIX and Linux Applications

SVN repo issues

We have about 5 different SVN repositories running on SVN 1.6.11 on top of CentOS Linux 6.3. I was asked to migrate our SVN server to a new server last week. We have a cron job that does a Full backup of each repo once a week, and every other night we do an incremental backup via svnadmin dump... (1 Reply)
Discussion started by: glev2005
1 Replies

7. AIX

Rpm issue with autoconf-2.63-1.AIX6.1.noarch.rpm

dears i am trying to install the autoconf-2.63-1.aix6.1.noarch.rpm but its shows the below error message . P700_dev/svn/dependencies>rpm -i autoconf-2.63-1.aix6.1.noarch.rpm error: failed dependencies: m4 is needed by autoconf-2.63-1 P700_dev/svn/dependencies> (6 Replies)
Discussion started by: thecobra151
6 Replies

8. UNIX for Dummies Questions & Answers

Configuring EPEL repo and setting it as default repo.

I am using RHEL 6, but with no RHN subscription. I tried installing the EPEL repo, it is enabled under yum repolist but when I try a sample search such as yum search nginx , there's a string of errno 14 PYCURL error 6 . When I tried yum list installed, it didn't work because it defaults to the... (0 Replies)
Discussion started by: Hijanoqu
0 Replies

9. Solaris

Solaris Repo Update

Hi Folks, Just a quick question on this, I've tried to run this a couple of times now - first time it failed I increased the swap. I'm not sure that increasing the physical memory will do any good, but will try later today - has anyone seen this or anything similar? SunOS fvssphsun01 5.11... (8 Replies)
Discussion started by: gull04
8 Replies

10. UNIX for Beginners Questions & Answers

Find which RPM Azure repo is used in "yum repolist" for EUS or non EUS repos

Hello, I'm looking for help with a script or ideally just a one line command perhaps that will check the results of yum repolist and look for a specific repo on a sever. We have some VM's using EUS repos from Red Hat and others that do not use EUS repos. The way we would see which repos are... (2 Replies)
Discussion started by: greavette
2 Replies
repo-rss(1)															       repo-rss(1)

NAME
repo-rss - generates an RSS feed from one or more Yum repositories SYNOPSIS
repo-rss [options] repoid1 [repoid2...] DESCRIPTION
repo-rss is a program for generating RSS feeds for one or more Yum repositories. GENERAL OPTIONS
-h, --help Help; display a help message and then quit. -f <file> Specify the file to which the RSS will be written. Default is repo-rss.xml. -l <link> Specify the URL to the RSS feed. Default is http://yum.baseurl.org/. -t <title> Specify the title for the RSS feed. Default is "RSS Repository - Recent Packages". -d <description> Specify the description of the RSS feed. Default is "Most recent packages in Repositories". -r <days> Specify the number of days to consider most recent. Default is 3. --tempcache Enable the use of a temporary directory for the yum cache. This is enabled by default for non-root users. EXAMPLES
Generate an RSS for the updates-released repository and save it as updates-release.xml: repo-rss -f updates-released.xml updates-released FILES
As repo-rss uses YUM libraries for retrieving all the information, it relies on YUM configuration for its default values like which reposi- tories to use. Consult YUM documentation for details: /etc/yum.conf /etc/yum/repos.d/ /var/cache/yum/ SEE ALSO
yum.conf (5) http://yum.baseurl.org/ AUTHORS
See the Authors file included with this program. BUGS
There are of course no bugs, but should you find any, you should first consult the FAQ section on http://yum.baseurl.org/wiki/Faq and if unsuccessful in finding a resolution contact the mailing list: yum-devel@lists.baseurl.org. To file a bug use http://bugzilla.redhat.com for Fedora/RHEL/Centos related bugs and http://yum.baseurl.org/report for all other bugs. Seth Vidal 2005 repo-rss(1)
All times are GMT -4. The time now is 02:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy