From Void Linux Wiki
Jump to: navigation, search

vkpurge is an 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 of operation: list and remove.

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 (kernels corresponding to installed kernel packages are preserved!):

# vkpurge rm all

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