Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

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.

share|improve this answer
    
thanks, it's working. – user160995 May 23 '13 at 0:34
    
this works for me – chip Sep 13 '14 at 8:15
    
Or as one-liner dpkg -l | grep linux-image-.*-generic | sort -k3 | tail -n1 | awk '{system ("sudo apt-get install --reinstall " $2)}' – A.B. Sep 4 '15 at 12:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.