Deleting is as easy as installing (allthough dependencies can be a pain).
rpm -e
--test perform a test
--force perform forced installation
--noscripts do not execute post-installation scripts
One remark : configuration files will
never be removed when you un-install a package.
Before you try to install, upgrade or delete a package it could be a very wise idea to first learn something
more about the package and get to know what exactly it is doing.
rpm -q
-f look for packages containing files with 'file-name'
-a look in all installed packages
-i display summary info
-l display all the files that are contained in the package
-c display all the configuration files in the package
Allthough this should be handled by a cron-job, you can rebuild the rpm-database.
This can come in handy when you're experiencing troubles when installing or removing packages.
rpm --rebuilddb
Sometimes you will not find a suitable rpm file (maybe because you're running an older distro). In that case,
you can still make use of the rpm-manager as long as you can get your hands on the source-rpm.
First of all, you will need to install the source-rpm itself (just by
rpm -ivh mysourcerpm.rpm
).
Now when you navigate to the directory
/usr/src/redhat
you will see that there's a directory
SOURCES and a directory
SPECS. The SOURCE directory (how obvious) contains the
.tar.gz-file. The SPECS directory contains a file that outlines
which settings need to be used during the creation of the rpm-file (much like a 'regular' configure script).
When you edit this file with your favorite editor, you can manually change the way the file is going to be compiled.
When you're done editing the specs-file, save it and enter
rpm -ba myspecsfile.specs
After you hit enter you will see a similar process as the one the you get when you're compiling a package. When
the 'compiling' stops, you can install the rpm-file in the usual way.