Common RPM commands

RPM reference cheatsheet:

Install/Upgrade a package

rpm -Uvh package.rpm

Install an old version of a package

rpm -Uvh --oldpackage oldpackage.rpm

Query which package installed a given file

rpm -qf /bin/cp

To force a package to overwrite conflicting files

rpm -Uvh --replacefiles package.rpm

To list files owned by an installed package

rpm -ql package

List scripts inside rpm file (pre, post scriptlets)

rpm -qp --scripts /tmp/ods-dsc-1.0-18.13201_centos53.noarch.rpm
Common RPM commands

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s