You are not logged in.

#1 2019-09-24 19:28:08

zimbi
Member
Registered: 2016-04-09
Posts: 6

old stuff in /usr/lib/modules

Hi,

i just noticed that I have lots of old stuff under /usr/lib/modules/ going back to kernel 4.20.10. Is there a mechanism to clean up die directory and remove old modules with the corresponding linux image?

Frank

Offline

#2 2019-09-24 19:34:30

loqs
Member
Registered: 2014-03-06
Posts: 17,315

Re: old stuff in /usr/lib/modules

If the modules are provided by a kernel package they would be removed when that kernel package is removed.
Does pacman show the modules as being owned by any package?

pacman -Qo /usr/lib/modules/path/to/some/modeule

Offline

#3 2019-09-25 08:48:20

zimbi
Member
Registered: 2016-04-09
Posts: 6

Re: old stuff in /usr/lib/modules

Doesn't look like pacman is taking care of this:
[frank@defiant ~]$ uname -a
Linux defiant 5.3.1-arch1-1-ARCH #1 SMP PREEMPT Sat Sep 21 11:33:49 UTC 2019 x86_64 GNU/Linux

[frank@defiant ~]$ pacman -Qo /usr/lib/modules/5.3.1-arch1-1-ARCH/modules.builtin
/usr/lib/modules/5.3.1-arch1-1-ARCH/modules.builtin is owned by linux 5.3.1.arch1-1

this shows that the modules of current running kernel are owned by the linux package. However if I run

[frank@defiant ~]$ pacman -Qo /usr/lib/modules/4.20.10-arch1-1-ARCH/modules.builtin
error: No package owns /usr/lib/modules/4.20.10-arch1-1-ARCH/modules.builtin

So looks as if they resided from updates of the linux package

Offline

#4 2019-09-25 08:56:06

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: old stuff in /usr/lib/modules

Did you ever install one of the various "keep my kernel modules on update" hooks?

Offline

#5 2019-09-25 09:27:55

zimbi
Member
Registered: 2016-04-09
Posts: 6

Re: old stuff in /usr/lib/modules

I have kernel-modules-hook installed
https://github.com/saber-nyan/kernel-modules-hook
but did not enable the linux-modules-cleanup.service, guess this will do the job

Offline

#6 2019-09-25 09:40:39

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: old stuff in /usr/lib/modules

If you consider this [SOLVED] please mark it as such by editing the title in your first post. https://wiki.archlinux.org/index.php/Co … ow_to_post

Offline

Board footer

Powered by FluxBB