0% found this document useful (0 votes)
1K views

Linux Patching Commands

This document provides descriptions and examples of common RPM commands used to install, upgrade, remove, query, and find files and dependencies of packages managed by the RPM Package Manager. Key commands include rpm -ivh to install a package, rpm -Uvh to upgrade, rpm -ev to remove, rpm -qa to list installed packages, rpm -qi to get package details, rpm -qf to find what package a file belongs to, and rpm -qR to find a package's dependencies.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views

Linux Patching Commands

This document provides descriptions and examples of common RPM commands used to install, upgrade, remove, query, and find files and dependencies of packages managed by the RPM Package Manager. Key commands include rpm -ivh to install a package, rpm -Uvh to upgrade, rpm -ev to remove, rpm -qa to list installed packages, rpm -qi to get package details, rpm -qf to find what package a file belongs to, and rpm -qR to find a package's dependencies.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Syntax

Description

rpm -ivh {rpm-file}

Install the package

rpm -Uvh {rpm-file}

Upgrade package

Erase/remove/ an installed
package
Erase/remove/ an installed
rpm -ev --nodeps {package} package without checking
for dependencies
rpm -ev {package}

rpm -qa
rpm -qi {package}

rpm -qf {/path/to/file}


rpm -qc {pacakge-name}
rpm -qcf {/path/to/file}
rpm -qa --last
rpm -qpR {.rpm-file}
rpm -qR {package}

Display list all installed


packages
Display installed information
along with package version
and short description
Find out what package a file
belongs to i.e. find what
package owns the file
Display list of configuration
file(s) for a package
Display list of configuration
files for a command
Display list of all recently
installed RPMs

Example(s)
rpm -ivh mozilla-mail-1.7.517.i586.rpm
rpm -ivh --test mozilla-mail1.7.5-17.i586.rpm
rpm -Uvh mozilla-mail-1.7.612.i586.rpm
rpm -Uvh --test mozilla-mail1.7.6-12.i586.rpm
rpm -ev mozilla-mail
rpm -ev --nodeps mozillamail
rpm -qa
rpm -qa | less
rpm -qi mozilla-mail
rpm -qf /etc/passwd
rpm -qf /bin/bash
rpm -qc httpd

rpm -qcf
/usr/X11R6/bin/xeyes
rpm -qa --last
rpm -qa --last | less
rpm -qpR mediawiki-1.4rc1Find out what dependencies
4.i586.rpm
a rpm file has
rpm -qR bash

You might also like