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
show-installed(1)														 show-installed(1)

NAME
show-changed-rco - show changes in an RPM package SYNOPSIS
show-changed-rco [options] DESCRIPTION
show-changed-rco gives a compact description of the changes to a packages Requires, Conflicts and Obsoletes data from the installed (or old) to a specified rpm file. OPTIONS
-h, --help show this help message and exit -C, --cache Tells repoquery to run entirely from YUM cache - does not download any metadata or update the cache. Queries in this mode can fail or give partial/incorrect results if the cache isn't fully populated beforehand with eg "yum makecache". -c <config file>, --config=<config file> Use alternative config file (default is /etc/yum.conf). --repoid=<repo> Specify which repository to query. Using this option disables all repositories not explicitly enabled with --repoid option (can be used multiple times). By default repoquery uses whatever repositories are enabled in YUM configuration. --enablerepo=<repo> In addition to the default set, query the given additional repository, even if it is disabled in YUM configuration. Can be used multiple times. --disablerepo=<repo> Do not query the given repository, even if it is enabled in YUM configuration. Can be used multiple times. --repofrompath=<repoid>,<path/url> Specify a path or url to a repository (same path as in a baseurl) to add to the repositories for this query. This option can be used multiple times. If you want to view only the pkgs from this repository combine this with --repoid. The repoid for the repository is specified by <repoid>. --old-packages=<pkg> Explicitly list the valid old packages to match the new packages against. --ignore-arch Ignore arch. so you can compare foo-2.i686 to foo-1.x86_64. --skip-new Only give output for packages which we've found an old package for. 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. James Antill 30 March 2011 show-installed(1)
All times are GMT -4. The time now is 07:56 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy