This document provides syntax examples for common RPM commands to install, upgrade, remove, query, and manage packages on Linux systems. Some key commands include rpm -ivh to install a package, rpm -Uvh to upgrade, rpm -ev to remove, rpm -qa to list installed packages, and rpm -qi to display package information.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
287 views1 page
RPM Command Cheat Sheet For Linux
This document provides syntax examples for common RPM commands to install, upgrade, remove, query, and manage packages on Linux systems. Some key commands include rpm -ivh to install a package, rpm -Uvh to upgrade, rpm -ev to remove, rpm -qa to list installed packages, and rpm -qi to display package information.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1
Syntax Description Example(s)
rpm -ivh {rpm-file} Install the package rpm -ivh mozilla-mail-1.7.5-17.i586.rpm
rpm -ivh --test mozilla-mail-1.7.5-17.i586.rpm rpm -Uvh {rpm-file} Upgrade package rpm -Uvh mozilla-mail-1.7.6-12.i586.rpm rpm -Uvh --test mozilla- mail-1.7.6-12.i586.rpm rpm -ev {package} Erase/remove/ an installed package rpm -ev mozilla-mail rpm -ev --nodeps {package} Erase/remove/ an installed package without rpm -ev --nodeps mozilla-mail checking for dependencies rpm -qa Display list all installed packages rpm -qa rpm -qa | less rpm -qi {package} Display installed information along with rpm -qi mozilla-mail package version and short description rpm -qf {/path/to/file} Find out what package a file belongs to i.e. rpm -qf /etc/passwd find what package owns the file rpm -qf /bin/bash rpm -qc {pacakge-name} Display list of configuration file(s) for a rpm -qc httpd package rpm -qcf {/path/to/file} Display list of configuration files for a rpm -qcf /usr/X11R6/bin/xeyes command rpm -qa --last Display list of all recently installed RPMs rpm -qa --last rpm -qa --last | less rpm -qpR {.rpm-file} Find out what dependencies a rpm file has rpm -qpR mediawiki-1.4rc1-4.i586.rpm rpm -qR {package} rpm -qR bash {package} - Replace with actual package name