RPM commands

Install, Erase, Upgrade Commands

Install package rpm -ivh cvuqdisk-1.0.9-1.rpm
Preparing...                ########################################### [100%]
   1:cvuqdisk               ########################################### [100%]

Erase a package 
# rpm -ev  cvuqdisk-1.0.9-1.x86_64 

Upgrade a package rpm -Uvh  cvuqdisk-1.0.9-1.rpm
Preparing...                ########################################### [100%]
    package cvuqdisk-1.0.9-1.x86_64 is already installed

List, Find commands

List all packages 
# rpm -qa 

List last installed packages
# rpm -qa --last
cvuqdisk-1.0.9-1.x86_64                       Fri 20 Jun 2014 09:43:50 AM CEST
kernel-uek-debuginfo-2.6.39-400.214.4.el6uek.x86_64 Wed 07 May 2014 10:50:56 AM CEST
kernel-uek-debuginfo-common-2.6.39-400.214.4.el6uek.x86_64 Wed 07 May 2014 10:47:28 AM CEST
...

List a specific package ( optimal with installation date )
# rpm -qa  | grep cvu 
cvuqdisk-1.0.9-1.x86_64
#  rpm -qa --last  | grep cvu 
cvuqdisk-1.0.9-1.x86_64                       Fri 20 Jun 2014 09:43:50 AM CEST

Query a Information of Installed RPM Package
# rpm -qi cvuqdisk-1.0.9-1.x86_64  
Name        : cvuqdisk                     Relocations: (not relocatable)
Version     : 1.0.9                             Vendor: Oracle Corp.
Release     : 1                             Build Date: Thu 25 Jul 2013 10:02:48 AM CEST
Install Date: Fri 20 Jun 2014 09:43:50 AM CEST      Build Host: adc4150332.us.oracle.com
Group       : none                          Source RPM: cvuqdisk-1.0.9-1.src.rpm
Size        : 10968                            License: Oracle Corp.
Signature   : (none)
Summary     : RPM file for cvuqdisk
Description :
This package contains the cvuqdisk program required by CVU.
cvuqdisk is a binary that assists CVU in finding scsi disks.
To install this package, you must first become 'root' and then set the
environment variable 'CVUQDISK_GRP' to the group that will own cvuqdisk.
If the CVUQDISK_GRP is not set, by default "oinstall" will be the owner group
of cvuqdisk.

Check dependencies of a package 
# rpm -qpR cvuqdisk-1.0.9-1.rpm
/bin/sh  
/bin/sh  
libc.so.6()(64bit)  
libc.so.6(GLIBC_2.2.5)(64bit)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1

Find a RPM name where a certain file belongs torpm -qf /usr/sbin/cvuqdisk
cvuqdisk-1.0.9-1.x86_64

Verify Commands

Verify a package
# rpm -Vp cvuqdisk-1.0.9-1.rpm
.M....G..    /usr/sbin/cvuqdisk

Reference

Leave a Reply

Your email address will not be published. Required fields are marked *