You are not logged in.

#1 2011-12-07 09:14:07

Narga
Member
From: Hải Phòng, Việt Nam
Registered: 2011-10-06
Posts: 60
Website

How to remove old kernel?

I've upgrade pae kernel to 3.1.4 but when I check the modules folder, it's:

$ ls /lib/modules
3.1.0-4-pae  3.1.2-1-pae  3.1.4-1-ARCH  extramodules-3.1-ARCH
3.1.1-1-pae  3.1.3-1-pae  3.1.4-1-pae   extramodules-3.1-pae

How to remove old kernel which is not use anymore

Offline

#2 2011-12-07 09:56:49

foutrelis
Developer
From: Athens, Greece
Registered: 2008-07-28
Posts: 705
Website

Re: How to remove old kernel?

You need to manually remove the leftover directories. Pacman didn't remove them because they contain untracked files (or maybe files owned by other packages).

The four module directories for kernels older than 3.1.4 should be safe to remove.

Offline

#3 2011-12-07 10:15:30

Awebb
Member
Registered: 2010-05-06
Posts: 6,688

Re: How to remove old kernel?

I'd recommend using pacman -Qo /path/to/file to find out if they belong to any other packages.

Offline

#4 2011-12-07 16:05:35

Narga
Member
From: Hải Phòng, Việt Nam
Registered: 2011-10-06
Posts: 60
Website

Re: How to remove old kernel?

Are you tell me?

sudo pacman -Qo /lib/modules

Offline

#5 2011-12-12 01:08:45

NotMine
Member
Registered: 2011-10-13
Posts: 19

Re: How to remove old kernel?

I saw similar output in my /lib/modules

When I looked inside "extramodules-3.1-ARCH" I noticed a file called "version". The contents of the "version" file matched the kernel version.

There were no other files in my "/lib/modules/extramodules-3.1-ARCH" directory.

Might be worth a try for Narga....

Offline

#6 2012-02-12 13:30:20

akephalos
Member
From: Romania
Registered: 2009-04-22
Posts: 114

Re: How to remove old kernel?

Because this thread comes up on searches about removing stray kernel modules, someone may need this:

Narga wrote:

Are you tell me?

sudo pacman -Qo /lib/modules

The pacman ownership query works on files, not directories. In order to check whether one of the files in a directory is owned by pacman, it can be done automatically with something like this:

$ find /lib/modules/3.0-ARCH/ -type f | xargs pacman -Qo
error: No package owns /lib/modules/3.0-ARCH/misc/vboxnetadp.ko
error: No package owns /lib/modules/3.0-ARCH/misc/vboxnetflt.ko
error: No package owns /lib/modules/3.0-ARCH/misc/vboxdrv.ko
error: No package owns /lib/modules/3.0-ARCH/misc/vboxpci.ko

In this case, none of the files in it are managed by pacman. Grep can be used to filter the results and show only the the managed packages, if any:

$ find /lib/modules/3.0-ARCH/ -type f | xargs pacman -Qo | grep "is owned by"

Offline

Board footer

Powered by FluxBB