Warning: THE VOID WIKI IS DEPRECATED. It is no longer being maintained, contains outdated and incorrect information, and will eventually be shut down. Please refer to the Void Handbook, https://docs.voidlinux.org/, for the official documentation. If you can't find the information you're seeking, please raise an issue at https://github.com/void-linux/void-docs/issues


From Void Linux Wiki
Jump to navigation Jump to search

vkpurge is a utility for listing and managing currently-unused kernels installed on your system. vkpurge can list and remove kernels installed manually as well as those installed via XBPS as individual packages or via the base-system metapackage.


vkpurge has two modes:

Listing Kernels

To list all kernels installed on your system except the currently-running kernel:

$ vkpurge list

Example output:

$ vkpurge list

Removing Kernels

To remove an installed kernel:

# vkpurge rm kernel

vkpurge will remove the kernel from /boot and regenerate your GRUB configuration.

For example:

# vkpurge rm 4.1.10_1
Removing kernel 4.1.10_1 files ...
Running pre-remove kernel hook: 20-dkms...
Removing /boot/config-4.1.10_1...
Removing /boot/System.map-4.1.10_1...
Removing /boot/vmlinuz-4.1.10_1...
Removing /lib/modules/4.1.10_1...
Running post-remove kernel hook: 10-dracut...
Running post-remove kernel hook: 50-grub...
Generating grub.cfg ...
Found background: /usr/share/void-artwork/splash.png
Found linux image: /boot/vmlinuz-4.1.12_1
Found initrd image: /boot/initramfs-4.1.12_1.img
Found linux image: /boot/vmlinuz-4.1.11_1 
Found initrd image: /boot/initramfs-4.1.11_1.img

To remove all kernels except the currently-running kernel:

# vkpurge rm all

Warning: This operation cannot be undone. Run vkpurge rm all with caution.