On 10/25/24 12:45 PM, Jeffrey Walton wrote:
On Tue, Oct 22, 2024 at 8:42 PM home user via users
<users@lists.fedoraproject.org> wrote:

(f-40; gnome; stand-alone dual-boot workstation; kernel 6.11.3)

Selected command output...

-bash.2[~]: rpm -qa kernel
kernel-6.10.12-200.fc40.x86_64
kernel-6.11.3-200.fc40.x86_64
-bash.3[~]:

-bash.3[~]: rpm -qa kernel-core
kernel-core-6.10.12-200.fc40.x86_64
kernel-core-6.11.3-200.fc40.x86_64
-bash.4[~]:

Related, be sure to look in /lib/modules for old kernel artifacts.
There have been several bugs related to proceccessing old kernel
removals. The removal scripts would _not_ remove the directory if they
were not empty, and the script had a bug that left a few small files.

Something like this is safe to run to cleanup /lib/modules:

# https://bugzilla.redhat.com/show_bug.cgi?id=2185410
clean_lib_modules() {
     if [[ -d "/lib/modules" ]]; then
         echo "Cleaning /lib/modules"
         # dirs=($(ls /lib/modules))
         mapfile -t dirs < <(ls /lib/modules)
         for dir in "${dirs[@]}"
         do
             dir="/lib/modules/${dir}"
             if [ "$(du -s -B 4096 "${dir}" | awk '{print $1}')" -lt 4096 ]
             then
                 echo "  removing ${dir}"
                 rm -rf "${dir}" 2>/dev/null
             fi
         done
     fi
}

Jeff

I do not fully understand that script, but I did the clean-up.  5 old 
directories, each having several times 4096 blocks were left behind.  I don't 
know if the problem is in dnf, a database, or something/somewhere else.  But 
post patching clean-up seems to be an ongoing problem.

I'm still needing the answer to the core questions of this thread.

--
_______________________________________________
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