Removing Old Kernels from /boot
Serge Y. Stroobandt
Copyright 2013–2016, licensed under Creative Commons BY-NC-SA
- Home
- Information Technology
- Removing Old Kernels
Introduction
Having a separate /boot
partition different from the root partition may offer the advantage of faster booting, especially on spinning hard drives. Such a /boot
partition is typically anywhere between 100 and 500MB in size. –I certainly prefer 500MB whenever possible.– However, there is also a disadvantage to this. As you keep your system up-to-date with upgrades, new kernels are installed while older kernels remain in place. If you are not careful, kernel images may eventually threaten to entirely fill up the /boot
partition.
Kernel version
First, check which kernel version you are currently running. It should be the latest kernel.
Removing obsolete kernels
In Debian-derived distributions, removing obsolete kernels is really easy. The apt-get autoremove
command will in most cases remove all but the two most recent kernels from a crammed /boot
partition.
Manually purging kernels
It may happen that an installed kernel may no longer be removed by means of apt-get autoremove
. This occurs when an older kernel version is no longer listed in the repository of a rolling Debian release. In such a case, you will need to purge the obsolete kernel manually.
$ sudo apt-get purge linux-headers-version-arch linux-image-version-arch
$ sudo rm \boot\*-version-arch
$ sudo dpkg-reconfigure grub-pc
This work is licensed under a Creative Commons Attribution‑NonCommercial‑ShareAlike 4.0 International License.
Other licensing available on request.
Unless otherwise stated, all originally authored software on this site is licensed under the terms of GNU GPL version 3.
This static web site has no backend database.
Hence, no personal data is collected and GDPR compliance is met.
Moreover, this domain does not set any first party cookies.
All Google ads shown on this web site are, irrespective of your location,
restricted in data processing to meet compliance with the CCPA and GDPR.
However, Google AdSense may set third party cookies for traffic analysis and
use JavaScript to obtain a unique set of browser data.
Your browser can be configured to block third party cookies.
Furthermore, installing an ad blocker like EFF's Privacy Badger
will block the JavaScript of ads.
Google's ad policies can be found here.
transcoded by to make it run as secure JavaScript in the browser.