what are the correct options for the rpm command to display a list of all installed packages?

RPM (Red Hat Package Manager) is an default open source and most popular package management utility for Red Chapeau based systems like (RHEL, CentOS and Fedora). The tool allows system administrators and users to install, update, uninstall, query, verify and manage system software packages in Unix/Linux operating systems. The RPM formerly known as .rpm file, that includes compiled software programs and libraries needed past the packages. This utility just works with packages that congenital on .rpm format.

RPM Command Examples
20 Most Useful RPM Command Examples

This commodity provides some useful 20 RPM control examples that might exist helpful to you. With the assistance of these rpm command you can managed to install, update, remove packages in your Linux systems.

Some Facts nearly RPM (RedHat Package Director)

  1. RPM is free and released nether GPL (General Public License).
  2. RPM keeps the data of all the installed packages under /var/lib/rpm database.
  3. RPM is the only way to install packages under Linux systems, if you've installed packages using source code, then rpm won't manage it.
  4. RPM deals with .rpm files, which contains the actual data about the packages such every bit: what it is, from where it comes, dependencies info, version info etc.

In that location are v bones modes for RPM command

  1. Install : It is used to install any RPM parcel.
  2. Remove : It is used to erase, remove or un-install whatsoever RPM packet.
  3. Upgrade : It is used to update the existing RPM packet.
  4. Verify : It is used to verify an RPM packages.
  5. Query : It is used query whatever RPM package.

Where to find RPM packages

Below is the list of rpm sites, where you lot can observe and download all RPM packages.

  1. http://rpmfind.net
  2. http://www.redhat.com
  3. http://freshrpms.net/
  4. http://rpm.pbone.net/

Read Too :

  1. xx YUM Command Examples in Linux
  2. 10 Wget Command Examples in Linux
  3. xxx Most Useful Linux Commands for System Administrators

Please recall you must be root user when installing packages in Linux, with the root privileges y'all can manage rpm commands with their advisable options.

1. How to Check an RPM Signature Parcel

Always check the PGP signature of packages before installing them on your Linux systems and make sure its integrity and origin is OK. Use the post-obit command with –checksig (check signature) option to cheque the signature of a packet called pidgin.

[[email protected]]# rpm --checksig pidgin-ii.seven.9-v.el6.2.i686.rpm  pidgin-2.7.ix-v.el6.2.i686.rpm: rsa sha1 (md5) pgp md5 OK

2. How to Install an RPM Parcel

For installing an rpm software parcel, use the following command with -i choice. For example, to install an rpm package called pidgin-2.seven.ix-5.el6.2.i686.rpm.

[[email protected]]# rpm -ivh pidgin-2.7.ix-5.el6.2.i686.rpm  Preparing...                ########################################### [100%]    1:pidgin                 ########################################### [100%]
RPM control and options
  1. -i : install a package
  2. -v : verbose for a nicer brandish
  3. -h: print hash marks every bit the package annal is unpacked.

three. How to cheque dependencies of RPM Package before Installing

Let's say you would like to do a dependency check before installing or upgrading a package. For example, utilise the following command to check the dependencies of BitTorrent-five.2.2-1-Python2.4.noarch.rpm package. It will display the list of dependencies of packet.

[[email protected]]# rpm -qpR BitTorrent-5.ii.two-1-Python2.4.noarch.rpm  /usr/bin/python2.4 python >= 2.3 python(abi) = 2.iv python-crypto >= two.0 python-psyco python-twisted >= ii.0 python-zopeinterface rpmlib(CompressedFileNames) = ii.vi
RPM command and options
  1. -q : Query a bundle
  2. -p : List capabilities this bundle provides.
  3. -R: List capabilities on which this package depends..

iv. How to Install a RPM Parcel Without Dependencies

If you know that all needed packages are already installed and RPM is but beingness stupid, y'all tin ignore those dependencies by using the option –nodeps (no dependencies check) before installing the package.

[[e-mail protected]]# rpm -ivh --nodeps BitTorrent-5.2.ii-i-Python2.four.noarch.rpm  Preparing...                ########################################### [100%]    1:BitTorrent             ########################################### [100%]

The in a higher place command forcefully install rpm bundle by ignoring dependencies errors, only if those dependency files are missing, so the program volition not work at all, until you lot install them.

5. How to check an Installed RPM Package

Using -q choice with bundle name, volition show whether an rpm installed or not.

[[e-mail protected]]# rpm -q BitTorrent  BitTorrent-5.2.2-1.noarch

half dozen. How to Listing all files of an installed RPM bundle

To view all the files of an installed rpm packages, use the -ql (query list) with rpm command.

[[email protected]]# rpm -ql BitTorrent  /usr/bin/bittorrent /usr/bin/bittorrent-console /usr/bin/bittorrent-curses /usr/bin/bittorrent-tracker /usr/bin/changetracker-panel /usr/bin/launchmany-panel /usr/bin/launchmany-curses /usr/bin/maketorrent /usr/bin/maketorrent-console /usr/bin/torrentinfo-console

7. How to List Recently Installed RPM Packages

Use the following rpm command with -qa (query all) option, will listing all the recently installed rpm packages.

[[email protected]]# rpm -qa --terminal  BitTorrent-5.2.two-1.noarch                     Tue 04 Dec 2012 05:14:06 PM BDT pidgin-2.vii.9-v.el6.2.i686                     Tue 04 December 2012 05:thirteen:51 PM BDT cyrus-sasl-devel-2.1.23-xiii.el6_3.1.i686       Tue 04 Dec 2012 04:43:06 PM BDT cyrus-sasl-2.i.23-thirteen.el6_3.1.i686             Tue 04 Dec 2012 04:43:05 PM BDT cyrus-sasl-md5-2.1.23-thirteen.el6_3.1.i686         Tue 04 Dec 2012 04:43:04 PM BDT cyrus-sasl-patently-2.1.23-13.el6_3.1.i686       Tue 04 December 2012 04:43:03 PM BDT

eight. How to List All Installed RPM Packages

Type the following command to print the all the names of installed packages on your Linux system.

[[email protected]]# rpm -qa  initscripts-9.03.31-2.el6.centos.i686 polkit-desktop-policy-0.96-ii.el6_0.1.noarch thunderbird-17.0-1.el6.remi.i686

nine. How to Upgrade a RPM Package

If we want to upgrade any RPM package "–U" (upgrade) selection will be used. One of the major advantages of using this option is that it will non but upgrade the latest version of any package, but information technology will also maintain the backup of the older parcel so that in case if the newer upgraded bundle does non run the previously installed bundle tin be used again.

[[email protected]]# rpm -Uvh nx-3.v.0-2.el6.centos.i686.rpm Preparing...                ########################################### [100%]    one:nx                     ########################################### [100%]

10. How to Remove a RPM Package

To un-install an RPM package, for example we use the bundle name nx, not the original bundle proper noun nx-3.five.0-2.el6.centos.i686.rpm. The -e (erase) option is used to remove package.

[[email protected]]# rpm -evv nx

eleven. How to Remove an RPM Package Without Dependencies

The –nodeps (Do not check dependencies) option forcefully remove the rpm packet from the system. But keep in listen removing item package may interruption other working applications.

[[e-mail protected]]# rpm -ev --nodeps vsftpd

12. How to Query a file that belongs which RPM Package

Allow'south say, you lot accept list of files and you would like to discover out which parcel belongs to these files. For example, the following control with -qf (query file) option volition show you a file /usr/bin/htpasswd is own past bundle httpd-tools-2.ii.xv-15.el6.centos.1.i686.

[[e-mail protected]]# rpm -qf /usr/bin/htpasswd  httpd-tools-2.2.15-15.el6.centos.1.i686

xiii. How to Query a Data of Installed RPM Package

Let's say you take installed an rpm package and desire to know the data about the package. The following -qi (query info) option will print the available information of the installed bundle.

[[electronic mail protected]]# rpm -qi vsftpd  Name        : vsftpd				   Relocations: (not relocatable) Version     : 2.ii.2				   Vendor: CentOS Release     : 11.el6				   Build Engagement: Fri 22 Jun 2012 01:54:24 PM BDT Install Date: Mon 17 Sep 2012 07:55:28 PM BDT      Build Host: c6b8.bsys.dev.centos.org Grouping       : System Environment/Daemons           Source RPM: vsftpd-2.2.two-11.el6.src.rpm Size        : 351932                               License: GPLv2 with exceptions Signature   : RSA/SHA1, Mon 25 Jun 2012 04:07:34 AM BDT, Key ID 0946fca2c105b9de Packager    : CentOS BuildSystem <http://bugs.centos.org> URL         : http://vsftpd.beasts.org/ Summary     : Very Secure Ftp Daemon Description : vsftpd is a Very Secure FTP daemon. It was written completely from scratch.

fourteen. Go the Data of RPM Package Earlier Installing

Yous take download a parcel from the internet and desire to know the information of a package before installing. For case, the following selection -qip (query info bundle) volition impress the information of a bundle sqlbuddy.

[[email protected]]# rpm -qip sqlbuddy-1.3.three-i.noarch.rpm  Name        : sqlbuddy                     Relocations: (not relocatable) Version     : 1.3.3                        Vendor: (none) Release     : 1                            Build Engagement: Wed 02 November 2011 11:01:21 PM BDT Install Date: (not installed)              Build Host: rpm.bar.baz Group       : Applications/Internet        Source RPM: sqlbuddy-one.iii.three-1.src.rpm Size        : 1155804                      License: MIT Signature   : (none) Packager    : Erik M Jacobs URL         : http://www.sqlbuddy.com/ Summary     : SQL Buddy â Web based MySQL administration Description : SQLBuddy is a PHP script that allows for web-based MySQL assistants.

15. How to Query documentation of Installed RPM Package

To get the list of available documentation of an installed package, apply the following command with option -qdf (query certificate file) will display the manual pages related to vmstat package.

[[electronic mail protected]]# rpm -qdf /usr/bin/vmstat  /usr/share/doc/procps-3.ii.eight/BUGS /usr/share/doc/procps-3.2.8/COPYING /usr/share/doc/procps-3.ii.eight/COPYING.LIB /usr/share/doc/procps-3.2.8/FAQ /usr/share/medico/procps-3.2.8/NEWS /usr/share/doc/procps-3.2.8/TODO

16. How to Verify a RPM Parcel

Verifying a package compares data of installed files of the package confronting the rpm database. The -Vp (verify parcel) is used to verify a package.

[[e-mail protected] downloads]# rpm -Vp sqlbuddy-1.3.3-1.noarch.rpm  S.5....T.  c /etc/httpd/conf.d/sqlbuddy.conf

17. How to Verify all RPM Packages

Type the following command to verify all the installed rpm packages.

[[email protected]]# rpm -Va  S.five....T.  c /etc/rc.d/rc.local .......T.  c /etc/dnsmasq.conf .......T.    /etc/ld.so.conf.d/kernel-2.6.32-279.5.two.el6.i686.conf S.5....T.  c /etc/yum.conf S.5....T.  c /etc/yum.repos.d/epel.repo

18. How to Import an RPM GPG key

To verify RHEL/CentOS/Fedora packages, you must import the GPG fundamental. To exercise so, execute the following command. It will import CentOS 6 GPG fundamental.

[[electronic mail protected]]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-Fundamental-CentOS-6

nineteen. How to List all Imported RPM GPG keys

To print all the imported GPG keys in your system, use the following control.

[[electronic mail protected]]# rpm -qa gpg-pubkey*  gpg-pubkey-0608b895-4bd22942 gpg-pubkey-7fac5991-4615767f gpg-pubkey-0f2672c8-4cd950ee gpg-pubkey-c105b9de-4e0fd3a3 gpg-pubkey-00f97f56-467e318a gpg-pubkey-6b8d79e6-3f49313d gpg-pubkey-849c449f-4cb9df30

20. How To rebuild Corrupted RPM Database

Sometimes rpm database gets corrupted and stops all the functionality of rpm and other applications on the system. So, at the time we need to rebuild the rpm database and restore it with the help of following control.

[[email protected]]# cd /var/lib [[e-mail protected]]# rm __db* [[electronic mail protected]]# rpm --rebuilddb [[e-mail protected]]# rpmdb_verify Packages

newmanancen1954.blogspot.com

Source: https://www.tecmint.com/20-practical-examples-of-rpm-commands-in-linux/

0 Response to "what are the correct options for the rpm command to display a list of all installed packages?"

Postar um comentário

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel