FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2015
    Location
    RPM
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question F22 - How to remove old kernel?

    In F21, I usually put "yum remove kernel" and it worked great after an update. Now I tried to do the same in F22 but those lines are still on. How can I do it successfully? I also tried "dnf remove kernel" but no effect.

    Please guide me how. Thanks in advance!

  2. #2
    Join Date
    Sep 2014
    Location
    Brasil
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    Did you try the simple way: rpm -Uvh kernel? It worked always to me.


    paroxitono8

  3. #3
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,324
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    dnf remove kernel works here, but the problem is it offers to remove them all

    dnf remove kernel
    Dependencies resolved.
    Removing:
    kernel x86_64 4.0.4-300.fc22 @System 0
    kernel x86_64 4.0.4-301.fc22 @System 0
    kernel x86_64 4.0.4-303.fc22 @System 0


    Transaction Summary
    ===========================================
    Remove 3 Packages

    Installed size: 0
    Is this ok [y/N]: N
    Operation aborted.


    so remove the kernel specifically:

    dnf remove kernel-4.0.4-300.fc22.x86_64
    Removing:
    kernel x86_64 4.0.4-300.fc22 @System 0

    Transaction Summary
    ==========================================
    Remove 1 Package

    Installed size: 0
    Is this ok [y/N]: n
    Operation aborted.


  4. #4
    Join Date
    Jun 2005
    Location
    Montreal, Québec, Canada
    Age
    85
    Posts
    10,161
    Mentioned
    33 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    Do not use dnf to remove kernels. YUM always keeps 3 versions. Current, one previous, and one recovery version.

    The total does not fill up /boot, which could house 15 versions. Overhead is one or two megabytes (not gigs) for the total of the parameter files. (initab)

    When a new kernel is installed, yum or dnf will remove the oldest kernel via the kernel's rpm scripts.
    Leslie in Montreal

    Interesting web sites list
    http://forums.fedoraforum.org/showth...40#post1697840
    We get too soon old, and too late smart!

  5. #5
    Join Date
    Jun 2004
    Location
    Maryland, US
    Posts
    15,324
    Mentioned
    186 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    You can also tweak the installonly_limit to some number in the /etc/dnf/dnf.conf file, this does the same thing as the old yum installonly_limit in /etc/yum.conf

    The default is 3 so you can get it to keep fewer kernels:

    installonly_limit=2

  6. #6
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    Just reading through the F22 release-notes after a fedup from F21.i386 > F22.i386. Yes, dnf will definitely wipe away all kernels, including the running kernel, if you mess up with that command.
    3.4.1.9. dnf will remove kernels
    kernel packages are not protected by dnf. Unlike with yum, you can remove all kernel packages, including the running package, if you direct it to. Be cautious with removing kernels, and specify the full version and release when removing them for best results.

  7. #7
    Join Date
    Oct 2014
    Location
    Computer land
    Posts
    93
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: F22 - How to remove old kernel?

    Thanks for all the advice on this issue it's much appreciated, I was able to follow this post with a simple method to remove the unwanted kernel, https://ask.fedoraproject.org/en/que...ion-from-grub/

    After that I just use the Grub customizer to remove the kernel entry

    Thanks so much for all the help

Similar Threads

  1. how to remove old kernel?
    By farmkid in forum Using Fedora
    Replies: 4
    Last Post: 9th April 2012, 03:33 PM
  2. PAE kernel remove?
    By BoyWonder410 in forum Using Fedora
    Replies: 1
    Last Post: 23rd May 2010, 11:22 PM
  3. Replies: 9
    Last Post: 1st October 2009, 02:57 PM
  4. how to remove my old kernel
    By patrinos06 in forum Using Fedora
    Replies: 13
    Last Post: 20th November 2006, 12:23 AM

Tags for this Thread

Posting Permissions

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