Compare/Audit locally installed RPM Packages between multiple Hosts

// September 24th, 2012 // Infrastructure

For the purposes of configuration management and configuration validation, we are often called to provide test artifacts demonstrating the current state and version of locally installed packages.  Listed below is a simple way to generate the resultant RPM versions between multiple systems.

Generate the RPM lists: (Perform this on both servers):

rpm -qa > rpm.`hostname -s`

Perform the diff:

for a in $(cat rpm.<newserver>) ;
do grep $a rpm.<oldserver> > /dev/null || echo $a ; done

Spread the word

    Joshua Johnson

    Joshua Johnson is a Southern California based IT professional specializing in IT Infrastructure, InfoSec, and fighting entropy.

    More Posts

    Comments are closed.