Re: Removing unwanted kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 14 March 2005 15:02, Phil Schaffner wrote:
> On Mon, 2005-03-14 at 11:13 -0600, Gustavo Seabra wrote:
> > For example, I have:
> > >rpm -qa | grep kernel-2 ; rpm -qa | grep kernel-sm
>
> An aside to the discussion - the following is a LOT more efficient than
> the above:
>
> # rpm -q kernel kernel-smp
>
True if you know the exact spelling of the package name, case and special 
characters included.  But 151 packages on my FC3 system have package names 
that are mixed case, 38 packages underscores in their name rather than 
hyphens (dashes) or in addition to hyphens.  57 have the string fc3 while 84 
have FC3.  Fortunately none have spaces in their names.  So if I am not 
exactly sure of the spelling I will do:  rpm -qa| grep -i  regex   where the 
regular expression is usually just a few letters, enough to produce a short 
list.  Lots of inconsistencies exist which really ought to be cleaned up.

There is a cron job run daily (/etc/cron.daily/rpm) that generates a file of 
packages names that are installed (/var/log/rpmpkgs).  That file could be 
grep-ed instead of the output of rpm -qa for faster performance if that file 
is current enough. (it runs at 0402 if the box is up or shortly after startup 
if you have anacron enabled.)

paul


-- 
Paul Almquist
paul@xxxxxxxxxxxxx
Eau Claire, WI  USA


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux