RPM Examples

Install RPM:
rpm -ivh package.rpm

Upgrade RPM:
rpm -Uvh package.rpm

Import an RPM GPG key:
rpm –import /media/cdrom/RPM-GPG-KEY

Getting detailed information about the package wget:
rpm -qi wget

Showing all the files installed by the package wget:
rpm -ql wget

Listing all files included in the not yet installed package wget by entering the following:
rpm -qpl /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm

Check if package installed:
rpm -qa | grep wget

Uninstall the package wget:
rpm -e wget

Which package owns a file:
rpm -qf /usr/bin/mysql
mysql-3.23.52-3

Getting the dependencies of a file:
rpm -q –requires -p package.rpm

extract all RPM contents to current directory
rpm2cpio foo.rpm | cpio -idv

find out when all software was installed on a system:
rpm -qa -last

find changelog of software:
rpm -q –changelog php

You can leave a response, or trackback from your own site.

Leave a Reply