Ubuntu – Why are linux-headers not upgraded by apt-git dist-upgrade

12.04upgrade

After a fresh ubuntu 12.10 installation, I faced some problems installing Nvidia drivers.

After some research discovered that linux-headers are not being upgraded when executing sudo apt-get dist-upgrade. I had to install the new headers manually although linux-image packages are installed.

Anyone knows why is this happening to me? Is it normal or there's something wrong?

Best Answer

If you installed linux-headers matching your running kernel version only, for example, linux-headers-3.5.0-18, then they will not be upgraded. Instead, do:

sudo apt-get install linux-headers-generic

The -generic header package will update headers every time linux-image is updated.