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