The workaround to keep the latest two kernels is to edit the /etc/apt/apt.conf.d/01autoremove-kernels file and change it to list the latest 2 kernels.
The workaround to keep the latest two kernels is to edit the /etc/apt/ apt.conf. d/01autoremove- kernels file and change it to list the latest 2 kernels.