2023-12-02 18:04 UTC+01:00, Thomas Cameron via users
<users@lists.fedoraproject.org>:
> 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@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to