Auto remove all old kernels in Ubuntu

By regularly installing updates you are ensuring that your computer is protected from known vulnerabilities and is working as intended. You also receive all the latest software versions, even the kernel which is the core of the operating system. In time, you’ll see multiple versions of it in the GRUB menu and it can possibly fill your root partition which in turn can lead to a variety of problems.