I can't remove a kernel

I’m trying to remove linux 6 in favour of linux-lts (5).
I have both currently installed on my machine. I’m currently booted in using the lts kernel.
AKM and terminal fail with the same message:

error: failed to prepare transaction (could not satisfy dependencies) :: removing linux breaks dependency 'linux' required by r8168

How can I remove linux 6 of my machine?

In a terminal window,

pacman -Q akm

If it says ‘Package akm was not found’ then install akm

sudo pacman -S amk

Then launch akm you should get this.

Be sure to uninstall or install both the desired kernel and it’s related headers files.

This should take care of the most common kernels.


You could try:

sudo pacman -Rc linux linux-headers

to remove the linux kernel along with whatever is dependent on it, namely r8168 in this case.


Package r8168 should not be a dependency to linux.
Have you manually added it as a dependency?

Also, are you sure you need package r8168? Does your ethernet work without it?

Then, why do you want to remove linux?

That did the trick. I was worried I was going to blow my wifi connection away but it didn’t :smiley:
I have no idea why r8186 was tied to linux 6. My installation is fairly new and I try to stay away from AUR as much as possible.

1 Like
~🐸 pacman -Si r8168
Repository      : community
Name            : r8168
Version         : 8.051.02-19
Description     : A kernel module for Realtek 8168 network cards
Architecture    : x86_64
URL             : http://www.realtek.com.tw
Licenses        : GPL
Groups          : None
Provides        : None
Depends On      : glibc  linux
Optional Deps   : None
Conflicts With  : None
Replaces        : None
Download Size   : 89.34 KiB
Installed Size  : 86.90 KiB
Packager        : Jan Alexander Steffens (heftig) <heftig@archlinux.org>
Build Date      : Tue 14 Feb 2023 23:46:40 CET
Validated By    : MD5 Sum  SHA-256 Sum  Signature

I guess r8168 only works with linux?

Seems your ethernet does not require r8168 package, and works with the corresponding kernel driver. So no separate r8168 package needed.

Yes, and r8168-lts works with linux-lts.


This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.