rpm -qa : list every rpm installed on your system
rpm -ql package-name : list the installed files associated with rpm package-name (it should be noted the version # of the package-name can be omitted. Ex: openssh-2.3.1 can be abbreviated openssh). To list the files in an uninstalled rpm use the same command only add the -p option: rpm -qpl package-name
rpm -qa | grep regexp : check to see if rpm conatining regexp in its name is installed on your system.
rpm -i package-name : install rpm package-name (must be root). Also by adding the --test option you can check for depency problems before actually installing.
rpm -U package-name : same as above only Upgrade instead of just install.
rpm -qi package-name : list info about package-name. This gives you a general idea of what the package does, what system it's intended for and who put it together. You can also query info from uninstalled packages with with the -p option: rpm -qpi package-name
rpm -qf filename : VERY IMPORTANT. Query file filename to see what RPM package it belongs to. This will keep you from deleting a file you think is useless.
One last trick. Many people complain about RPM dependency problems. The easiest way to solve these are by using
www.rpmfind.net. You can query by a filename or an RPM name. Also if you know you have all the RPMs required to do an install but don't know which ones to install first you can specify them all on the command line with a glob character '*.rpm' and let the rpm command sort out the dependencies itself.