I've accidentally run sudo apt remove linux-image-unsigned-5.14.1-051401-generic
and prompted to a <YES> + <NO> optinonal screen saying that it's my kernel version currently running.

I've tried downloading the files with the same version in here and do apt install *.deb and do restart.
now there's is a red-broken-package icon saying some package broken, when I do apt update it says I need to reinstall headers package.

--fix-broken install result :

ainul@ainul-Swift-SF314-43:~ $ sudo apt --fix-broken install
[sudo] password for ainul: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following packages will be REMOVED:
  linux-headers-5.14.10-051410-generic
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 23,3 MB disk space will be freed.
Do you want to continue? [Y/n] n
Abort.

reinstall result :

ainul@ainul-Swift-SF314-43:~ $ sudo apt install --reinstall linux-headers-5.14.10-051410-generic 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Reinstallation of linux-headers-5.14.10-051410-generic is not possible, it cannot be downloaded.
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 linux-headers-5.14.10-051410-generic : Depends: libc6 (>= 2.34) but 2.31-0ubuntu9.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

is there any way I can fix the headers ? Im worried that it will causing error removing the kernel currently running


Solution 1:

Just press y when it says to remove that package (apt --fix-broken install)