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?
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.
The kernel version
4.4.0-47 is the latest update of the kernel released by Canonical Kernel Team.
You can purge the old kernel from the command line using
To install it run:
sudo apt-get install bikeshed
To keep the latest kernel and purge old kernel:
sudo purge-old-kernels --keep 1
The two directories exist because kernel modules built for kernel
4.4.0-45 aren't compatible with kernel modules built for kernel
Deleting kernels is difficult, especially for noobs. It's too easy to break your system, leave files behind, and in general, force you to learn way more than you want to about the innards of Linux. It's good to learn, but not when you're trying to fix a broken system.
Luckily, there is a tool to help. It's called
purge-old-kernels, and is part of (comes along with) the
byobu package. (if
man purge-old-kernels fails, do
sudo apt-get install byobu and retry).
xenial (1) purge-old-kernels.1.gz Provided by: byobu_5.105-0ubuntu1_all NAME purge-old-kernels - remove old kernel and header packages from the system