Show Menu
Cheatography

Redhat Package Manager

Info

/var/l­ib/rpm RPM database

Query

rpm -qa show all installed packages
rpm -qi package show local package info
rpm -ql package show local package content
rpm -qf /path/­to/file show package owning the file
rpm -qd package show local package docs
rpm -qc package show local package config
rpm -qpi /path/­to/­package show remote package info
rpm -qpl /path/­to/­package show remote package content

Instal­l/U­pgrade

rpm -ivh package install a new package
rpm -Uvh package upgrade or install the package
rpm -Fvh package upgrade package

Uninstall

rpm -e package uninstall package
rpm -e --repl­acepkgs package replace package
 

Verify

rpm -Vvf /path/­to/file verify file against package database
. shows verifi­cation successful
5 shows MD5 verifi­cation unsucc­essful
S shows file size verifi­cation unsucc­essful
L shows symlink verifi­cation unsucc­essful
T shows mtime verifi­cation unsucc­essful
D shows device major/­minor number verifi­cation unsucc­essful
M shows mode verifi­cation unsucc­essful
? shows files unreac­hable
U shows user ownership verifi­cation unsucc­essful
G shows group ownership verifi­cation unsucc­essful

Import

rpm --import /path/­to/­gpg/key import public key
rpm -qa gpg-pu­bkey* shows all imported public key
rpm -qi gpg-pu­bke­y-d­b42a60e shows info about a specific public key
rpm -e gpg-pu­bke­y-d­b42a60e uninstall a specific public key
 

Comments

No comments yet. Add yours below!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.

          Related Cheat Sheets

          OSC - Open Build Service Command Line Client Cheat Sheet
          RPM Build Basics Cheat Sheet

          More Cheat Sheets by misterrabinhalder