Re: how to remove unwanted old kernels.

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

 



2023-12-02 18:04 UTC+01:00, Thomas Cameron via users
<users@xxxxxxxxxxxxxxxxxxxxxxx>:
> Here's what I do. It's on RHEL, but the process is the same for Fedora.
>
> First, find all kernels which are installed.The last one is the latest,
> so we ignore that one.
>
> ----------------------------------
> [root@neuromancer ~]# rpm -qa kernel | sort
> kernel-5.14.0-284.25.1.el9_2.x86_64
> kernel-5.14.0-284.30.1.el9_2.x86_64
> kernel-5.14.0-362.8.1.el9_3.x86_64
> ----------------------------------
>
> Grab the version number for the oldest two and use that to find all
> related packages installed on my machine:
>
> ----------------------------------
> [root@neuromancer ~]# rpm -qa | grep -e 5.14.0-284.25.1 -e 5.14.0-284.30.1
> kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64
> kernel-core-5.14.0-284.25.1.el9_2.x86_64
> kernel-modules-5.14.0-284.25.1.el9_2.x86_64
> kernel-5.14.0-284.25.1.el9_2.x86_64
> kernel-core-5.14.0-284.30.1.el9_2.x86_64
> kernel-modules-core-5.14.0-284.30.1.el9_2.x86_64
> kernel-modules-5.14.0-284.30.1.el9_2.x86_64
> kernel-5.14.0-284.30.1.el9_2.x86_64
> ----------------------------------
>
> Now remove all the RPMs with those version numbers. This is all one long
> command:
>
> ----------------------------------
> [root@neuromancer ~]# dnf remove
> kernel-modules-core-5.14.0-284.25.1.el9_2.x86_64
> kernel-core-5.14.0-284.25.1.el9_2.x86_64
> kernel-modules-5.14.0-284.25.1.el9_2.x86_64
> kernel-5.14.0-284.25.1.el9_2.x86_64
> kernel-core-5.14.0-284.30.1.el9_2.x86_64
> kernel-modules-core-5.14.0-284.30.1.el9_2.x86_64
> kernel-modules-5.14.0-284.30.1.el9_2.x86_64
> kernel-5.14.0-284.30.1.el9_2.x86_64
> Updating Subscription Management repositories.
> Dependencies resolved.

Why not remove just kernel-core? dnf will take care of the dependent
packages (kernel-modules and the rest).
--
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue



[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux