Previous Section  < Day Day Up >  Next Section

Recipe 2.4. Removing RPMs

2.4.1 Problem

You've gotten tired of some program and want to get rid of it. Or you've just installed something you don't want. So, you want to remove an RPM package.

2.4.2 Solution

rpm -e does the job:

# rpm -ev tuxpaint

You don't need the entire package name (e.g., tuxpaint-9.13-1.i386.rpm), just the label.

To uninstall several programs at once, use a space-delimited list:

# rpm -ev tuxpaint SDL_ttf  SDL_ttf-devel SDL_images

If you don't want to check dependencies:

# rpm -ev —nodeps tuxpaint

To test your command first, before executing it, use:

# rpm -ev —test tuxpaint SDL_ttf  SDL_ttf-devel SDL_images

2.4.3 Discussion

If RPM reports that it cannot remove a package because other packages depend on it, you either need to remove the other packages, or leave it alone. There are times when you need to break dependencies; for example, when replacing Sendmail. Your new MTA—Postfix, Exim, or qmail—will resolve Sendmail's dependencies, but you have to remove Sendmail first, which you can't do without breaking all kinds of dependencies.

2.4.4 See Also

    Previous Section  < Day Day Up >  Next Section