I am considering disabling auto-updates or pinning the kernel to a specific version. However I am concerned that when I later unpin the version, that all kernels in between the pinned version and the latest version will need to be downloaded and installed which would cause /root
to run out of disk space.
Does each kernel version need to be downloaded and installed or does apt-get
know to only fetch the latest kernel?
autoremove
clean up kernels? It certainly didn't on Trusty, which requires manual removal. – Chris H Mar 21 '18 at 09:26autoremove
keeps the current kernel and one previous (and the currently-booted kernel), so you can recover if the new one fails to boot. But it will remove kernels older than that. See/etc/apt/apt.conf.d/01autoremove-kernels
and/etc/kernel/postinst.d/apt-auto-removal
which generates that. (If you've done multiple updates that installed new kernels but never got around to booting them, doautoremove
after rebooting to get down to 2 kernels installed, instead of 3) – Peter Cordes Mar 21 '18 at 12:31