RedHat Package Manager rpm guide

Hello ALL,

This is a fast tutorial on linux RedHat package manager . Let’s navigate the rpm (Redhat package manager) command with its options.

rpm : no :D, It does not work without options.

Listing Packages
rpm : no :D, It does not work without options.

– Query all packages :
rpm -qa // you may add | more command to see them page by page and navigate between pages using space & enter keys

– Query Specific package
rpm -q pkgName

– Query with more details(informations) about the package
rpm -qi pkgName

-Query all files used by this package
rpm -ql pkgName

This may be enough but we can add 2 more useful options
-qf over specific file will check which packages this file belongs to or generated by.
rpm -qf file-path-name

-qlp do the same but over rpm archive , not a file
rpm -qlp package-path-name.rpm

rpm -i packageName.rpm installs the package
rpm -ivh packageName.rpm installs the package, showing you what is going on during the installation [ verbose messages with hash sign indicates the progress

Upgrading installed pacckage
rpm -U packageName.rpm upgrades the package
rpm -Uvh packageName.rpm upgrade showing you what is going on

rpm -e pkgName erase the package
rpm -e –nodeps pkgName erase and neglect the dependences messages

Verification for some package verify deifferent aspects of information related to files, owner, group, ….
detailed explanation can be found here

rpm -V pkgName
rpm -Va for all packages

Good luck,