* rpm -qa      : alle geinstalleerde packages weergeven

* rpm -qf /dir/file     : geeft weer wat het geinstalleerde package is op basis van de /dir/file

 vb. rpm -qf /etc/init.d/tomcat5

Onderstaande RPM commandos vereisen dat de cursor zich in het path van de packages bevinden.
* rpm -qpR  java

* rpm -qpi vnc-server-4.0-0.beta4.3.2.i386.rpm

 By running the above command all the information about the package will be printed on screen.
 When using "-p" query parameter RPM knows that it's treating a file, in this case the VNC RPM package.
 Note that the "-i" parameter here is used in "Query Mode", it's not the install one.
* rpm -pql java-1.5.0-sun-devel-
 So you can list the files that are installed by a RPM package.
 This is usefull when you have to verify the contents of a package, execute the following on the shell to see the contents of the installed package "cpp":

* rpm -ql "................" -> lists
[root@P-DBS1 init.d]# rpm -qa *tomcat5*

[root@P-DBS1 init.d]# rpm -q tomcat5-5.5.23-0jpp.7.el5 -c

[root@P-DBS1 init.d]# rpm -q tomcat5-5.5.23-0jpp.7.el5 -R
config(tomcat5) = 0:5.5.23-0jpp.7.el5
jakarta-commons-daemon >= 1.0.1
jakarta-commons-launcher >= 0:0.9
java-gcj-compat >= 1.0.31
java-gcj-compat >= 1.0.31
jpackage-utils >= 0:1.6.0
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
tomcat5-common-lib = 0:5.5.23-0jpp.7.el5
tomcat5-common-lib = 0:5.5.23-0jpp.7.el5
tomcat5-server-lib = 0:5.5.23-0jpp.7.el5
tomcat5-server-lib = 0:5.5.23-0jpp.7.el5
xerces-j2 >= 0:2.7.1
xml-commons-apis >= 1.3
[root@P-DBS1 init.d]# 


Kijken of een bepaald programma geinstalleerd is.
En zo ja meer info erover.

[nsisc@E-DBS2 ~]$ rpm -qa |grep PHR   // rpm query all


[nsisc@E-DBS2 ~]$ rpm -qi RTAP.PHRP_09085-A.08.80-1   // rpm query info
Name        : RTAP.PHRP_09085              Relocations: (not relocatable)
Version     : A.08.80                           Vendor: (none)
Release     : 1                             Build Date: Fri 27 Mar 2009 01:43:45 AM CET
Install Date: Mon 04 May 2009 02:21:06 PM CEST      Build Host: iqaluit
Group       : Applications/Databases        Source RPM: RTAP.PHRP_09085-A.08.80-1.src.rpm
Size        : 19934317                         License: Verano
Signature   : (none)
URL         : http://www.verano.com
Summary     : Verano Performux Real-time Database
Description :
Verano Performux cumulative patch.
[nsisc@E-DBS2 ~]$


rpm -qa |grep -i rtap

Query naar alle geinstalleerde RTAP keyword bevattende bestanden.

RPM varia   (source : http://www.pixelbeat.org/docs/packaging.html )

1.Individual packages are managed by rpm and dpkg on Red Hat and Debian respectively, the common operations being listed below

Red Hat         Description

rpm -Uvh packages(s).rpm    install/upgrade package file(s)
rpm -e package        remove package
rpm -qa '*spell*'        show all packages whose names contain the word spell
rpm -q package        show version of package installed
rpm -q -i package       show all package metadata
rpm -q -i -p package.rpm    show all package file's metadata
rpm -q -f /path/file       what package does file belong
rpm -q -l package       list where files were installed
rpm -q -l -p package.rpm    list where files would be installed
rpm2cpio package.rpm | cpio -id extract package files to current directory
rpm -q --requires package    list files/packages that package needs
rpm -q --whatrequires package  list packages that need package (see also whatrequires)

More complicated commands I find useful are to list all packages by size on RPM and DEB distros respectively:

rpm -q -a --qf '%10{SIZE}\t%{NAME}\n' | sort -k1,1n

 2.At a higher level, package dependencies can be automatically managed by yum and apt. With these tools one can essentially say "install this package" for e.g. and all dependent packages will be installed/upgraded as appropriate. One of course has to configure where these tools can find these packages, and this is typically done by configuring online package repositories.
Red Hat         Description

yum update [package list]   upgrade specified packages (or all installed packages if none specified)
yum install <package list>   install latest version of package(s)
yum remove <package list>  remove specified packages from system
yum list [package list]    list available packages from repositories

Uninstall a package :
-> rpm -qa | grep -i <package name>       .. You should then find the exact package name:
<package name>

Then run
rpm -e <package name>to uninstall it.