Re: Safe way to remove old kernels

redhat.com | Red Hat, Inc.

On Tue, Jul 19, 2005 at 02:16:09AM -0230, Shane Lahey wrote:

> MM> Install the “yum-utils” package from Fedora Extras, and run:
> MM> sudo package-cleanup –oldkernels
> MM> (assuming you have sudo privileges, of course).
>
> Im still new to Fedora Core myself, diden’t realize there was a
> package-cleanup. Would it be better to use the package-cleanup rather
> than ‘rpm -e’, or do they both do the same thing?

yum-utils is new, so it’s no surprise it’s not widely known. Ultimately, it does the same thing as rpm -e, but it’s less prone to typos (oops! I removed all my kernels!) and has more features. Well, one feature — it can conveniently remove all kernels but the latest N (defaults to 2) in one swoop.