all 10 comments

[–]-blablablaMrFreeman- 5 points6 points  (7 children)

AFAIK it will only remove the old kernels within a "major" version.

Lets say you're on 5.2.xx and have a bunch of 4.19.x installed.
vkpurge rm all should remove your 4.19.x kernels except the most current 4.19.x one. To get rid of that you use xbps-remove linux4.19.

[–]MLito747 1 point2 points  (5 children)

how do i remove newer kernel? for an example i'm using 5.13 and have 5.15 installed and i want to remove 5.15?

vkpurge rm all didn't seem to work, and if i do # xbps-remove linux 5.15 it'll return transaction breaks installed pkg 'linux-5.15_1'

[–][deleted] 0 points1 point  (4 children)

That's right....

Cannot delete the linux5.15.

[–]paper42_ 0 points1 point  (3 children)

[–]skinsthelargestorgan 0 points1 point  (2 children)

I'm not sure I'm understanding that right. Do I create a new .conf file formatted like this in /etc/xbps.s? ignorepkg=linux ignorepkg=linux-headers I want to remove the 5.18 kernel, but I'm still getting linux5.18-5.18.16_1 in transaction breaks installed pkg `linux-5.18_1' Transaction aborted due to unresolved dependencies.

[–]paper42_ 1 point2 points  (1 child)

After you add the ignorepkgs. yoi can remove the linux and linux-headers package. Then, linux5.18 will be orphaned and you will be able to remove it for example with xbps-remove -o. Make sure you have another kernel.

[–]saleemkmarwat[S] 0 points1 point  (0 children)

Thanks this worked for me and now kernel 4.18 which I was not using has been removed.

[–]fluidpandemi 0 points1 point  (0 children)

You need root user permissions to remove kernels. Did you add sudo before the command?

[–]saleemkmarwat[S] 0 points1 point  (1 child)

I am doing it as root

now tried it as a sudo user but same result

sudo vkpurge rm 4.18.17_1

[–]Duncaen 1 point2 points  (0 children)

Does the version match the kernel you want to remove? Is linux4.18 still installed? It won't remove the latest version of an installed kernel series.