Adding and Removing programs in Fedora
by Gar Nelson.
So you have your new installation of Fedora up and running and so far you're quite happy with the results. Then you decide that it's time to start installing some new programs. So how do you add in new packages, or remove packages you don't need?
As you follow along, it is possible that the screenshots may look slightly different than on your system. The default desktop for Fedora is GNOME, but a recent online poll here at TuxMagazine.com indicated that a fairly sizeable majority of desktops were using KDE. Therefore, in writing this article, I decided to do my testing and screenshot captures using the KDE desktop.
Basic package installation and removal isn't all that complex. Your first stop is the Fedora Package manager. To access this tool, look under System Settings on the main menu. You should see an entry for Package Management (Add/Remove Applications). Click on this to pull up the package manager (see figure below -- click for a larger size view).
note: you will need to supply the 'root' password since you're practicing safer computing by not using 'root' as your normal login account.
By checking or unchecking boxes on major functional groups, or by going to 'Details' for individual applications, you can add or remove application programs that were supplied with your distribution.
Select the programs you want to add or remove, and then click on the 'Update' button. If you are adding an application, the manager will figure out which of the distribution disks your application is on, and where any additional programs that may be required are located. When you click on 'Continue', you will be prompted for which disk to place in the CDROM drive. The application will be installed, and you will be shown a window indicating that the update is complete.
Another alternative for finding new software for your Fedora desktop is to check out one of the RPM file sources such as Dag Wieers excellent Redhat/Fedora resource. http://dag.wieers.com/packages/ These files will be in the .rpm format, rather than as a tar file that would need to be compiled for your system. When you click on an application name, be sure to look at the description field to make sure you get the file that is built for your system. (i.e., Fedora Core 1, Fedora Core 2, or Fedora Core 3)
Click on the application package you want to install. Your browser should open a download window, and ask what you want to do with the file. The default action should be to open the file with 'Install Packages'. If this isn't available, select 'Save to Disk' and place the file in your home directory.
This will automatically call the graphical package manager to install the application you selected. Click on Continue when the application is installed.
note: The installer may, or may not place a program icon on your desktop, or in the program menus. In the case of 'Putty', you can find it in the Internet section of the application menu tree.
If you had to download the file to your home directory, click on your 'Home' desktop icon to open up your home directory. You should see the the file displayed as an open box with a sheet of paper poking out the top. Clicking on the box should install the file with your package management tool. The command line alternative would be to open a terminal window (such as Konsole) and do the installation from the command line. Use the 'su' command to change to the 'root' user, and use the rpm package manager directly.
rpm -Uvh putty-0.56-1.1.fc1.dag.i386.rpm
The '-Uvh' switches to the rpm application indicate that you want to Upgrade or install, you want rpm to tell you what it is doing, and you want it to display an ascii text bar indicator to let you observe its progress.
The main advantage to using the rpm application directly to install .rpm packages, is you can see exactly what is going on with your installation. A big disadvantage is that the rpm application will warn you about failed dependencies (other required files that are not included in the .rpm you are installing) but it will not attempt to resolve the dependency issues.
Putting the YUM in Package Installation
In times past, you'd spend time googling to identify what package a particular missing library or header file was in, and then go search for a location to aquire that missing .rpm package. Now, thanks to some people at Duke University, you have an alternative to manually hunting down dependency issues.
YUM, Yellowdog Updater, Modified http://linux.duke.edu/projects/yum/ is an application you can use to install or remove packages, look up descriptions of packages, and if desired, automatically keep your Fedora installation up to date. Yum is included in the distributed version of Fedora.
Yum depends on a correctly configured /etc/yum.conf file to tell the application how to process files, and where to look for them. File locations can be your local computer, a local networked drive, or a remote system accessible by http, or ftp. The file source does not need to be an official Redhat/Fedora site. In the example above, where we went to Dag Wieer's web page, we can just as easily configure yum to look at those files, and use them to install from. This would symplify our command line to;
yum install putty
If we weren't sure what the putty program is suppose to do for us, either because we incompletely heard about it somewhere, or we saw it in /usr/bin and wondered what it is, yum will tell us with the command;
yum info putty
Yum could easily be the topic of a complete article all on its own, there are many options available to you. When you install the yum rpm that comes with the Fedora distribution, it is preconfigured to use official Fedora file sources. Unofficial sources can easily be added by editing the /etc/yum.conf file with your favorite file editor, perhaps 'kate' or 'gedit'. The following three lines, and an internet connection will allow yum to search the Dag Wieer archive. Be aware that the first time you use yum, it will take a significant amount of time. In order to know what files are located where, all the header files not currently on your system (descriptions of software you haven't yet installed) will need to be downloaded to your system by yum.
[dag] name=Fedora Core $releasever Dag Wieers' repository baseurl=http://apt.sw.be/fedora/$releasever/en/i386/dag/
To change this to search the US mirror, the entry would be;
[dag] name=Fedora Core $releasever Dag Wieers' repository baseurl=http://ftp.freshrpms.net/pub/dag/fedora/$releasever/en/i386/dag/
note: Dag Wieer is not the only unofficial archive available for packages not included in the standard Fedora distribution. There are many source available, with a minimum of searching. This is one example that works, and is a demonstration of how to get yum to look elsewhere. The 'elsewhere' you look to for your own system is up to you.
To remove the putty package using yum, the command is simply;
yum remove putty
As you can see, for a command line tool, using yum to manage your installation is a fairly simple process.
Adding and removing software packages from your Fedora system can be accomplished with a few mouse clicks, or by directly using command line tools. Graphical package managers are already listed in your menu tree. Command line tools like rpm, or its frontend program yum, are only a terminal window away. All that is left is for you to explore which method is most comfortable for you to manage your own system, and make it a perfect fit for you.