Results 1 to 9 of 9

Thread: Deleting old kernels

  1. #1
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    8,846
    Blog Entries
    3

    Default Deleting old kernels

    On one system, I installed 12.3 RC2, and then used "zypper dup" to go to 12.3 final.

    It looks as if the older kernel (from RC2) is still there). I cannot find any installed package that claims it as a file.

    Is there a command (other than "rm") to clean out old kernels? Or do I just use "rm".

    If I use "rm" it looks as if what needs to be removed is confined to "/boot", "/lib/modules" and "/lib/firmware".

    Alternatively, I could presumably just leave the old kernels there, as doing no harm.
    opensuse Leap 42.2; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  2. #2
    Join Date
    Nov 2009
    Location
    ND, USA
    Posts
    1,140

    Default Re: Deleting old kernels

    On 3/27/2013 3:16 PM, nrickert wrote:
    >
    > On one system, I installed 12.3 RC2, and then used "zypper dup" to go to
    > 12.3 final.
    >
    > It looks as if the older kernel (from RC2) is still there). I cannot
    > find any installed package that claims it as a file.
    >
    > Is there a command (other than "rm") to clean out old kernels? Or do I
    > just use "rm".
    >
    > If I use "rm" it looks as if what needs to be removed is confined to
    > "/boot", "/lib/modules" and "/lib/firmware".
    >
    > Alternatively, I could presumably just leave the old kernels there, as
    > doing no harm.
    >
    >

    nrickert;

    As long as you're not short on disk space, IMHO, "If it ain't broke, don't fix it."

    --
    P.V.
    "We're all in this together, I'm pulling for you" Red Green

  3. #3
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,383

    Default Re: Deleting old kernels

    On 03/27/2013 03:16 PM, nrickert wrote:
    >
    > On one system, I installed 12.3 RC2, and then used "zypper dup" to go to
    > 12.3 final.
    >
    > It looks as if the older kernel (from RC2) is still there). I cannot
    > find any installed package that claims it as a file.
    >
    > Is there a command (other than "rm") to clean out old kernels? Or do I
    > just use "rm".


    That is what I use, but mine were never put there by zypper.

    > If I use "rm" it looks as if what needs to be removed is confined to
    > "/boot", "/lib/modules" and "/lib/firmware".


    Only /boot and /lib/modules. The files in /lib/firmware do not belong to a
    particular kernel, but are for the devices.

    > Alternatively, I could presumably just leave the old kernels there, as
    > doing no harm.


    Other than taking up space, they add to the complexity of the grub2 menu. For
    me, the space can be a concern. When bisecting a kernel regression, I might get
    20-30 kernels in /boot and fill up my 20 GB space for /.




  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    8,846
    Blog Entries
    3

    Default Re: Deleting old kernels

    Quote Originally Posted by lwfinger View Post
    Only /boot and /lib/modules. The files in /lib/firmware do not belong to a
    particular kernel, but are for the devices.
    There's a directory there: /lib/firmware/3.7.9-1.1-desktop
    which seems to belong to that kernel. I checked the filelist for the installed 3.7.10 kernel to give me a hint on where to look for kernel associated files.

    Quote Originally Posted by lwfinger View Post
    Other than taking up space, they add to the complexity of the grub2 menu.
    Yes, quite right. And they cause the unnecessary rebuild of the 3.7.9 "initrd" whenever an update triggers an "initrd" rebuild.

    Thanks for the reply.
    opensuse Leap 42.2; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  5. #5
    Join Date
    Jun 2008
    Location
    Kansas City Area, Missouri, USA
    Posts
    7,383

    Default Re: Deleting old kernels

    On 03/27/2013 04:06 PM, nrickert wrote:
    >
    > lwfinger;2541828 Wrote:
    >> Only /boot and /lib/modules. The files in /lib/firmware do not belong to
    >> a
    >> particular kernel, but are for the devices.

    >
    > There's a directory there: /lib/firmware/3.7.9-1.1-desktop
    > which seems to belong to that kernel. I checked the filelist for the
    > installed 3.7.10 kernel to give me a hint on where to look for kernel
    > associated files.


    I forgot about those. They certainly can be deleted. The firmware search path
    includes /lib/firmware and /lib/firmware/`uname -r`. I am not sure of the order.



  6. #6
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    8,846
    Blog Entries
    3

    Default Re: Deleting old kernels

    Thanks. The feedback is appreciated.
    opensuse Leap 42.2; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  7. #7
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,862

    Default Re: Deleting old kernels

    On 2013-03-28 01:36, nrickert wrote:
    >
    > Thanks. The feedback is appreciated.


    Run

    Code:
    rpm -qa | grep -i kernel
    to verify what kernels the rpm database know as installed. Or you can run:

    Code:
    rpm -qf /boot/kernelindoubt
    and it will tell you directly if it comes from some installed kernel
    rpm, or if it is an orphan.


    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

  8. #8
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    8,846
    Blog Entries
    3

    Default Re: Deleting old kernels

    Quote Originally Posted by robin_listas View Post
    Run

    Code:
    rpm -qa | grep -i kernel
    to verify what kernels the rpm database know as installed.
    Thank you. Yes, it showed the 3.7.9 kernel there.

    I had previously searched for "kernel" in Yast software manager, and it showed 3.7.10. However, after seeing that "rpm" output, I clicked the "versions" button in software manager, and it showed both 3.7.9 and 3.7.10.

    I deleted 3.7.9 from there (from the version list).

    The output while it was running said things like "kernel-desktop removed". But a check afterwards showed that only the 3.7.9 version had been removed.
    opensuse Leap 42.2; KDE Plasma 5;
    opensuse tumbleweed; KDE Plasma 5 (test system);

  9. #9
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,862

    Default Re: Deleting old kernels

    On 2013-03-28 04:16, nrickert wrote:
    >
    > robin_listas;2541916 Wrote:



    >> to verify what kernels the rpm database know as installed.
    >>

    > Thank you. Yes, it showed the 3.7.9 kernel there.
    >
    > I had previously searched for "kernel" in Yast software manager, and it
    > showed 3.7.10. However, after seeing that "rpm" output, I clicked the
    > "versions" button in software manager, and it showed both 3.7.9 and
    > 3.7.10.


    Ah :-)

    > I deleted 3.7.9 from there (from the version list).
    >
    > The output while it was running said things like "kernel-desktop
    > removed". But a check afterwards showed that only the 3.7.9 version had
    > been removed.


    Good :-)

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.1 x86_64 "Asparagus" at Telcontar)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •