Every time Ubuntu installs a new Linux kernel, the old one is left behind. This means that if you are regularly updating an Ubuntu system the Grub boot menu becomes longer and longer with kernels you don’t need anymore.
The old kernels are deliberately left installed and on the menu so you can boot a previous kernel if you have trouble with a new one.
1.Open the terminal and type there
It will print the version of the Linux kernel you are running, this is the one you want to keep. It should look something like this: