Adding and Removing Programs with YaST2

Adding and Removing Programs with YaST2

If there's a specific program you would like to install, the simplest and most efficient way is to use YaST2. YaST2 is able to handle all aspects of program installation, dealing with RPM files and managing the entire RPM system.

One of the best things about using YaST2 to install software is that it automatically takes care of dependencies. If any program needs additional software or library files, YaST2 will install these, too, and will confirm the additional selection of programs with you before writing anything to the hard disk.

Dependencies are something you'll come across on a regular basis when installing programs. Unlike many Windows programs, SUSE Linux installation packages ordinarily don't come complete with all the support files they need. It's anticipated that you'll either already have these installed or will install them separately. However, a RPM package will refuse to install unless these support files are present.

Because of this, when manually installing programs (that is, not using YaST2), a situation informally called "dependency hell" can arise. In such a case, the user attempts to install a program but is told that it needs other files. These other files are then found, downloaded, and an attempt made to install them, but then another error message appears saying that they, too, have their own set of dependencies! When installing by hand, this can take some time to resolve. YaST2 takes care of it automatically.


If a Linux program does come with the support files it needs, it will most likely be described as statically linked. However, this is rare. Most are dynamically linked, which means the program doesn't come with the required library files compiled into it, forcing the user to ensure the libraries are available elsewhere on the system.

Installing from the SUSE DVD

To use YaST2, select K menu ® Control Center, and then click the YAST2 Modules icon. Click the Software icon, and then click Install and Remove Software. Changes made to the software setup affect the entire system, so it's necessary to click the Administrator Mode button and enter your root password.

You'll then be able to search for any program by its name. This will query the database of programs that are available on the installation DVD, as show in Figure. You should make sure you insert your SUSE installation DVD, because the files will be read from the disc and installed.

Image from book
Figure. You can search for programs on the DVD-ROM using the YaST2 program.

If you're looking for a program to fulfill a particular need but don't know its name, you can enter a search term and put a check in the Description box beneath the Search field. For example, if you're looking for a web browser, you could enter "browser" as a search term. The results will be displayed on the right side of the screen. In using this function you're also searching the oneor two-sentence description of each application, but these are usually concise rather than verbose, so this shouldn't be seen as comprehensive way of finding what you want.

Once you've found the program you're looking for, put a tick in the box next to it, and then click the Accept button at the bottom right.


If the box next to the application already has a tick in it, that program has been previously installed. You should check the K menu to see if it's present. If it doesn't appear to be, try opening a Konsole window and running the program from there by typing its name.

YaST2 also provides a user-friendly way to browse the programs you have installed as well as look at those that are available for installation, avoiding the need to keep searching for programs. Simply select Package Groups in the Filter drop-down list at the top of the YaST2 program window. This will show a similar grouping of programs that you saw when you first installed SUSE Linux, and it's a nice way to get acquainted with the programs you have installed on your system.

Installing from the SUSE FTP Archive

By default, YaST2 is set up to use the SUSE installation DVD as its source. However, it's also possible to add the main SUSE FTP archive as an installation source, which you might want to do if you have a fast connection to the Internet and/or you're not always going to have the DVD around to be able to install from.

To add the FTP site, be sure you're online (YaST2 will check the installation source to make sure it's valid), and then follow these steps:

  1. Select K menu ® Control Center, click YaST2 Modules, click Software, and then click Change Source of Installation.

  2. Click the Administrator Mode button and enter your root password.

  3. Click the Add button in the lower half of the screen.

  4. Select FTP from the list. In the dialog box that appears, enter the following details, as shown in Figure:

    Image from book
    Figure. You may want to add the main SUSE FTP site as an installation source if you won't always have the DVD on-hand.

    Server name: Directory on server: pub/suse/i386/9.1/
  5. Click OK.

  6. You can then delete the DVD installation option, which should be at the top of the list. Select it and click the Delete button at the bottom of the screen.

  7. Return to the Software screen of YaST2. When you first do this, you should find that there's a delay while YaST2 downloads the list of packages from the FTP site.

Depending on where you live, you might find the main SUSE FTP server a little slow. SUSE takes advantage of mirror servers that echo the content of its main site. You can find a list of these at Simply substitute the details in step 4 with those for a server local to you.

Uninstalling Programs via YaST2

Removing programs using YaST2 is almost as simple as adding them. The procedure is undertaken from the same Install and Remove Software component within YaST2. Once again, you will need to search for the program, but this time, the results returned will be those that are already installed. You can tell this because each piece of software in the search results will already have a check in the box next to it.

Marking the software for deletion is simply a matter of unchecking the box until a trash can icon appears. You need to click twice for this to happen. Clicking only once selects the program for an update, which reinstalls the program (this is useful for attempting to fix programs that have gone wrong).

Once you've marked the software for deletion, click Accept, and YaST2 will attempt to uninstall that program. I use the word attempt deliberately, because the program might be part of a dependency chain. In this case, other programs rely on it, just like some programs need other packages in order to be installed. If there are dependencies, then the program cannot be uninstalled without further work, and YaST2 will present a dialog box offering solutions to fix the problems.

For example, you would encounter this problem if you tried to remove the Sane scanner program. The XSane program relies on this, as do various other system programs. Because of this, attempting to remove Sane will cause YaST2 to show an error dialog box along with three separate solutions, as shown in Figure: don't delete Sane, delete Sane as well as the programs that rely on it, or simply go ahead and delete just Sane (and risk problems in future).

Image from book
Figure. If you try to remove a program that other programs need, YaST2 will offer various solutions.

There's no hard-and-fast rule in a dependency situation such as this, apart from the obvious: unless you have a pressing need to remove the program, you might as well let it stay on your system to avoid problems. Alternatively, you can try to find out about the programs that rely on the program you're trying to remove, and decide if they can go, too. However, be aware that removing these other programs might create additional dependency chains!


Unless you absolutely know what you're doing, you should definitely not choose to go ahead and delete a package when there are dependency problems. This is one of the quickest ways to damage your system. Apart from anything else, every time you try to add a program in the future using YaST2, you'll be presented with the same error dialog box reporting dependency problems, which will get annoying very quickly.

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows