How do I upgrade software in Linux? In both source-based installations and RPM-based.
In source-based installations, do I have to uninstall the old version before installing the new version? If so, if I deleted the old version's source files, do I have to first download the old version's source to uninstall it, then download the new version's source to install the new version?
In RPM installations, can I simply do an rpm -U command? How will the RPM program know which RPM package to upgrade, especially if the name of the RPM package has changed either because of version number or complete name change?
For example, let's say I initially installed a program using this command:
rpm -i abc01.rpm
Do I install a new version doing this:
rpm -U abc02.rpm
Also, if an old version was installed as a source-based installation, can I upgrade it using rpm -U? Or do I have to uninstall the old version then use rpm -i?
Thanks a lot,
rpm -Uvh <packagename>.rpm will either install or upgrade the package.
Here is the best book on using rpm: Maximum RPM
# Guides to software management
LNAG - How do I install a program I downloaded from the Internet?
Rute Guide's software explanation
You might want to check out CheckInstall to manage source code installations/uninstallation
With source based installs its usually quite alright to just compile the new version and install, but that sometimes can leave garbage files from the older version, and sometimes configuration files needs to be updated as well, read the docs it usually provides useful information on upgrading.
If you're going to compile for the source often I highly recommend a source based distro like Gentoo, the portage system does all the dirty work for you, fetching/installing dependencies, apply patches, upgrade/uninstall cleanly, update configuration files, enable/disable features depending on your choice through "USE" flags, check system consistency(sometimes when there's updates to system libraries softwares which depends on it have to be recompiled) etc etc.
I suggest you give apt a try for installing-upgrading the packages that are included in your distro. http://apt.freshrpms.net/
|All times are GMT -5. The time now is 06:13 PM.|