RPM Notes

November 22, 2015 in memos.

Here is a collection of my notes on using RPM. Most of these are well documented in man pages and other sources around the web. I've collected the ones I've used most here as a reference for myself and others.

Query package information

Show package information

$ rpm -qi yum-cron
Name        : yum-cron                     Relocations: (not relocatable)
Version     : 3.2.29                            Vendor: CentOS
Release     : 69.el6.centos                 Build Date: Fri 24 Jul 2015 05:28:06 AM CDT
Install Date: Thu 03 Sep 2015 06:14:37 PM CDT      Build Host: c6b9.bsys.dev.centos.org
Group       : System Environment/Base       Source RPM: yum-3.2.29-69.el6.centos.src.rpm
Size        : 28204                            License: GPLv2+
Signature   : RSA/SHA1, Fri 24 Jul 2015 03:43:15 PM CDT, Key ID 0946fca2c105b9de
Packager    : CentOS BuildSystem <http://bugs.centos.org>
URL         : http://yum.baseurl.org/
Summary     : Files needed to run yum updates as a cron job
Description :
These are the files needed to run yum updates as a cron job.
Install this package if you want auto yum updates nightly via cron.

Show package file list

This shows all files included in a package.

$ rpm -ql yum-cron

Show a packages configuration files

Similar to -q but only lists configuration files

$  rpm -qc yum-cron

Show a packages documentation

Similar to previous examples, but only shows documentation.

$ rpm -qd yum-cron

Show a packages changelog

$ rpm -q --changelog yum-cron
* Thu Dec 03 2015 Johnny Hughes <johnny@centos.org>  - 3.4.3-132.el7.centos.0.1
- Roll in Manual Branding Change to constants.py

* Thu Nov 19 2015 CentOS Sources <bugs@centos.org> - 3.4.3-132.el7.centos
- CentOS yum config
-  use the CentOS bug tracker url
-  retain installonly limit of 5
-  ensure distrover is always from centos-release
- Make yum require yum-plugin-fastestmirror