0

My wifi adapter stopped working suddenly and after some research I found out it was due to a recent kernel update.

I was trying to follow this solution to fix the issue but after step 1:

Purge all packages related to kernel 5.8.0-34-generic: sudo apt purge linux-image-5.8.0-34-generic linux-image-unsigned-5.8.0-34-generic linux-modules-5.8.0-34-generic linux-headers-5.8.0-34-generic

I am getting the following error:

(Reading database ... 266336 files and directories currently installed.)
Removing linux-image-5.8.0-34-generic (5.8.0-34.37~20.04.2) ...
E: Aborting removal of the running kernel
dpkg: error processing package linux-image-5.8.0-34-generic (--remove):
 installed linux-image-5.8.0-34-generic package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.8.0-34-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

How can I fix this?

shardul08
  • 41
  • 1
  • 8

1 Answers1

3
E: Aborting removal of the running kernel

You are trying to remove the kernel you are currently running. Please boot a different kernel (if you don't get the GRUB menu on boot, press Shift or the arrow keys) and remove the kernel you want. You can check your running kernel with uname -r

BulletBob
  • 1,780