Show Menu
Cheatography

Redhat Package Manager

Info

/var­/li­b/rpm RPM database

Query

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

Instal­l/U­pgrade

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

Uninstall

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

Verify

rpm -Vvf /path­/to­/fi­le 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­/gp­g/k­ey import public key
rpm -qa gpg-p­ubk­ey* shows all imported public key
rpm -qi gpg-p­ubk­ey-­db4­2a6­0e shows info about a specific public key
rpm -e gpg-p­ubk­ey-­db4­2a6­0e uninstall a specific public key

Help Us Go Positive!

We offset our carbon usage with Ecologi. Click the link below to help us!

We offset our carbon footprint via Ecologi
 

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