Useful RPM Commands | SUSE Communities

Useful RPM Commands


RPM package is a powerful utility for managing the software packages of major Linux distributions. RPM can be used to install and remove software packages, update packages and get an overview of all installed packages.

Here are some useful commands to manipulate RPM packages:

== Query / Verify commands

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


  1. Determining which package installed the file /usr/bin/wget:
    rpm -qf /usr/bin/wget


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


  1. Viewing the documentation files for the command wget:
    rpm -qd wget


  1. 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


  1. Listing all files included in the installed package wget:
    rpm -ql wget


  1. Verifying that a package is no longer installed by entering:
    rpm -qa | grep wget


  1. Seeing what has changed in the files on your hard drive since the wget RPM was originally installed by entering the following:
    rpm -V wget


  1. Checking package to ensure its integrity and origin: (NOTE: gpg or pgp software must be installed on your system before you use this command)
    rpm -K /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm


== Install / Uninstall / Upgrade commands

  1. Installing the package wget:
    rpm -ivh /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm


  1. Uninstalling the package wget:
    rpm -e wget


  1. Upgrading the package wget: (NOTE: if the package is not installed it will install it for You, like option “-ivh”)
    rpm -Uvh /mnt/iso/suse/i586/wget-1.10.2-78.i586.rpm


  1. Extracting RPM file using rpm2cpio and cpio command: (NOTE: RPM content will be extracted the current directory)
    rpm2cpio wget-1.10.2-78.i586.rpm | cpio -idmv
(Visited 1 times, 1 visits today)


  • G says:

    How can i see which users ae able to install RPM packages?

  • Leave a Reply

    Your email address will not be published.