Hello I upgraded all packages on my Ubuntu, and kernel also. But in upgrading process kernel upgrade failed, and I must always after grub load select older kernel. It is a terminal command to reinstall latest kernel?
Asked
Active
Viewed 6.3k times
1 Answers
32
Run the following command in a terminal (Ctrl+Alt+T):
dpkg -l | grep linux-image-.*-generic
Look for the kernel version you want to reinstall then run:
sudo apt-get install --reinstall linux-image-3.X.Y-ZZ-generic
Of course, you must type the actual kernel version (e.g. linux-image-3.8.0-21-generic) instead of linux-image-3.X.Y-ZZ-generic.
Eric Carvalho
- 54,385
dpkg -l | grep linux-image-.*-generic | sort -k3 | tail -n1 | awk '{system ("sudo apt-get install --reinstall " $2)}'– A.B. Sep 04 '15 at 12:03linux-image-generic9with no version number), should I do something with that, too? – J. B. Rainsberger Sep 01 '21 at 09:20