Ubuntu – Why are there two kernels under `/lib/modules` on 16.04 LTS

kernel

Disk Usage Analyzer shows 4.4.0-45 and 4.4.0-47 under /lib/modules, why is that? Is it needed to have two kernels or has the old one stayed after an update? Is it safe to remove the older kernel?

Best Answer

It is common to keep one older kernel version around in case the new one breaks.

The previous version is available on grub's Advanced Options menu.

Kernels that Ubuntu automatically installs can be automatically removed by using:

sudo apt autoremove

This removes older kernels (that Ubuntu automatically installed) but keeps the current version and the one before it.

When you manually install kernels (often necessary to get new hardware support or address a certain "glitch" you have) you need to manually remove them.

Related Question