[root@deep] /#rpm -Uvh foo-1.0-2.i386.rpmWith this command, RPM automatically uninstalls the old version of foo package and install the new one. Always Take a note that RPM packages have a file of names like foo-1.0-2.i386.rpm, which include the package name (foo), version (1.0), release (2), and architecture (i386).
To uninstall a RPM package, use the command:
[root@deep] /#rpm -e fooNotice that we used the package name foo, not the name of the original package file foo-1.0-2.i386.rpm.
To get a list of all installed RPMs, use the command:
[root@deep] /#rpm -aqThis command will print the package name, version, and release number of installed package foo. Use this command to verify that a package is or is not installed on your system.
To display package information, use the command:
[root@deep] /#rpm -qi fooThis command display package information; includes name, version, and description of the installed program. Use this command to get information about the installed package.
To list files in package, use the command:
[root@deep] /#rpm -qpl foo-1.0-2.i386.rpmThis command will list all files in an RPM package.