Adding a kernel removal script to linux-base or elsewhere

Jarno Suni j_suni at yahoo.co.uk
Sat Oct 15 12:06:53 UTC 2016


On Friday, October 14, 2016 2:11 AM, J Fernyhough <j.fernyhough at gmail.com> wrote:

>Doesn't `apt-get autoremove` remove old kernel versions already? (IIRC it keeps three? old versions)


It depends on script 
/etc/kernel/postinst.d/apt-auto-removal and when it is run last time, which automatically 
installed kernels it does NOT remove. `apt-get autoremove` removes other packages that are automatically installed and that no package depends on, too, which may or may not be wanted. It may be unable to remove old kernels in some cases when /boot or system is full. My script is designed to handle such cases, too. My script can even remove kernels that are unknown to the package management system.




More information about the Ubuntu-devel-discuss mailing list