Posts Tagged ‘RPM’

Roll back RPM packages – CentOS/RedHat

Wouldn’t it be useful to be able to easily undo a yum/RPM change that you have just made? Well you can. By default yum/RPM do not save roll back information. This feature can easily be enabled by doing the following, however its not perfect and can use a lot of disk space as its repackaging […]

RPM Examples

Install RPM: rpm -ivh package.rpm Upgrade RPM: rpm -Uvh package.rpm Import an RPM GPG key: rpm –import /media/cdrom/RPM-GPG-KEY Getting detailed information about the package wget: rpm -qi wget Showing all the files installed by the package wget: rpm -ql wget

Compare RPM’s on two servers

Useful if your migrating from an old server to a new one and want to check everything needed is installed. First, pull a list of RPM package by name only: rpm -qa –queryformat=’%{NAME}\n’ | sort > server.txt Once you’ve done that on both servers, just use diff to compare the two files: diff serverold.txt servernew.txt […]