top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration Why to Join

Facebook Login
Site Registration

One-shot yum command to match rpms between systems?

0 votes
57 views

Given a list of rpms on one system (rpm -qa > list.txt), is there a one-shot command that I can run on another system to remove all of the rpms not listed and add any that are on the list and not present on the second system?

posted May 18, 2016 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

2 Answers

+1 vote

If you had an internal repo of these packages you could yum distro-sync ... otherwise there is no one shot command to do this given a list.

And of course as will be pointed out by many the only right answer is yum update anyway given cherry picking updates is not supported.

Reference: one-shot yum command to match rpms between systems? From: Frank Cox

answer May 18, 2016 by Hasan Raza
0 votes

I'd probably turn it into a puppet manifest or ansible playbook, and use that to install the packages. I'd not use rpm -qa unadorned, though, but rpm -qa --qf "%{NAME}.%{ARCH}n".

answer May 18, 2016 by anonymous
Similar Questions
+4 votes

When I do a yum list installed and I get a list of the installed packages for the local system.

However, I have no idea where this data is coming from, is it coming from the
/var/lib/rpm ,
/var//lib/yum/yumdb

or perhaps somewhere else? Is there a switch I could use to change the db, or to point to a different yumdb/dir?

I've got a drive from a separate/older system that I'd like to mount/examine to see what packages where installed with yum on that drive...

the "installroot" switch appears to be used to chroot into a separate location for the yum.repos.d" - but I could be wrong..

+2 votes

I have a small problem with some packages : I was doing an update over ssh and my connection was interrupted .. now i have a lots of duplicates and if i try to remove them, yum tries to uninstall all system (447 packages 1.4 gb)

Any idea how can I clean this mess? It would be pretty bad if the machine needs to be re-installed only because the connection went bad during the process...

+1 vote

Any idea why yum doesn't show by default from what mirror it is downloading from?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...