Skip to main content
  1. Posts/

Compare the RPM packages installed on two different servers

·97 words·1 min·

Setting up new servers can be a pain if you’re not able to clone them from a server that is known to be working. Many VPS providers, like Slicehost, allow you to clone a system to a new system. Without that option, you can pull a list of RPM’s without their version number for a fairly quick and basic comparison.

First, pull a list of RPM package by name only:

rpm -qa --queryformat='%{NAME}\n' | sort | uniq > server.txt

Once you’ve done that on both servers, just use diff to compare the two files:

diff serverold.txt servernew.txt