rpm –U command works for both installation of new packages and for upgrading. When you get beyond simple installations, you begin to see the power of the RPM system where most operations require just one command. The rpm -U command is a very powerful tool and performs some complex operations with just one command. For example, the following commands show the sequence for upgrading the jpilot package, which is used for Palm PDA synchronization.
# rpm -q jpilot
jpilot-0.97-1
# rpm -U jpilot-0.99.2-8.i386.rpm # rpm -q jpilot
jpilot-0.99.2-8jpilot package is no longer installed. The rpm -U command removed that package.
Uninstallation Scripts
--noscripts option only turns off the scripts from the new package. If an old package is removed, the uninstallation scripts for the old package still get executed.
--repackage option, which works the same as when removing packages. The --repackage option tells the rpm command to create a package, an RPM file, from any packages it would erase. Note that this option will not create a complete package. You will not be able to reinstall a package created by the --repackage option. At best, the --repackage option provides a backup of the old package, from which you could create a working package. Be careful with the --repackage option.
--repackage option.
rpm -U --repackage jpilot-0.99.2-8.i386.rpmConsistent Package Names
jdk-1.3.1_01.i386.rpm for the 1.3.1 version but changes to j2sdk-1_4_0_01-fcs-linux-i386.rpm for the 1.4.0 version.