This is kind of a “101” lesson, but it’s an issue that can really baffle Linux newbies. Ubuntu Linux, when configured to auto-update itself, will update its own kernel. That’s all fine, but the problem is that it retains the old kernel data, which can quickly build up in the standard
/boot partition – a partition that is typically not very large.
First, check to see what version of the Linux kernel is active:
Next, do a directory listing of the contents of /boot:
ls -l /boot
You’ll notice that there are multiple files there w/ the same versions – don’t sweat that – the removal process will remove the corresponding files on a per-version basis.
Starting with the OLDEST version, run the following:
sudo apt-get purge linux-image-<oldest version number>
Repeat for each of the old kernels (but be sure not to accidentally attempt to delete the current, live kernel!).
Also, I typically keep the last version, as well – just in case.
Note that there are many tutorials on this topic, some of which provide a huge, complex-looking single line of code to do all of these steps at once. I’m not a big fan of this, as too many things can go wrong. Better to do this one step at a time, IMO.