Originally Published: Tuesday, 9 October 2001 Author: Maninder Bali, CEO, Centurion Linux
Published to: enhance_articles_sysadmin/Sysadmin Page: 3/3 - [Printable]

Application Management on Linux: Installing, Upgrading and Uninstalling Software from your Linux box.

For many people a big challenge between installing and starting to get anything out of Linux is dealing with software downloads. There might seem like a bewildering array of options. Actually though, the process is fairly simple and logical, that shouldn't be surprising, since this is only a computer, after all. In this article Linux.com contributor Maninder Bali lays out the steps needed to manage your applications and downloads, in source and RPM binaries.

  << Page 3 of 3  

RPM Packages

The reason RPM packages are so popular and freely available is that they are easy to install, upgrade and remove from your system. Apart from that, RPM provides you with additional functionality like querying your system for installed packages and keeping track of what files it has installed and where it has installed those files.

So let's get on with installing an RPM package:

# rpm -ivh package.ix86.rpm

In the above command, the package would be the name of any package like xmms-1.2.2-4, the ix86 would be the architecture the package was compiled for.

The -i argument instructs the RPM utility to install the package, while the -v increases the verbosity level, and the -h displays hashes as a progress bar while the software is being installed on your machine.

That is about all it takes to install an RPM package, unless of course some dependency problems arise. A dependency problem could mean that the package being installed might need another package installed in order to work correctly. In other cases, a dependency problem might arise if the package to be installed needs a specific version of some software or library installed. In such cases, what you have to do is install/upgrade the dependencies and then continue with the installation of the software.

Let's see some other useful utilities of the rpm command.

At a later stage, should you need to see where a particular package has installed all the files, all you have to do is type:

# rpm -ql packagename

Here, packagename is the name of the package you want to query, e.g xmms. The -p option queries the database to check if the package is installed, and the -l option lists all the files in that package with the full paths. Here is a sample output of the above command:


[Lord@Work CrismusBonus]$ rpm -ql Eterm
/etc/X11/wmconfig/Eterm
/usr/bin/Esetroot
/usr/bin/Etbg
/usr/bin/Etcolors
/usr/bin/Eterm
/usr/bin/Eterm-0.9
/usr/bin/Ettable
/usr/bin/Etwinop
[...]

Apart from querying software, RPM provides an easy way to uninstall software. You can remove any software package installed using the rpm -ivh command by the following command:

# rpm -e packagename

where -e option instructs the rpm utility to erase/uninstall the package defined by the packagename.

Please note that rpm will not allow you to uninstall software on which other software has dependencies. This is because uninstalling the software will break all dependencies and make it difficult for you to use the apps. that depend on the app you want to uninstall. However, if you still must uninstall the package, check the rpm manpage for details.

Having seen how to install and uninstall software packages using rpm, lets now move on to upgrading a software package using the rpm utility. Upgrading software is similar to installing new software. The following command explains it:

# rpm -Uvh package.ix86.rpm

The -U option upgrades the packagename mentioned. The -v and the -h are the same as in the install options.

So there you are. Installing, uninstalling and upgrading using the RPM.

About the author: Maninder Bali works for Centurion Linux, one of the most promising Linux start-ups in India. Centurion Linux is working on its own GNU/Linux distribution and was featured on Linux.com. To find out more about Centurion Linux, check out http://www.centurionLinux.com




  << Page 3 of 3