Remove old kernels
You might need to remove old kernels for various reasons:
- The boot partition is too small for multiple kernel versions
clr-boot-manager
not automatically cleaning up old entries- Custom or testing kernels installed that won't be automatically removed
If the boot partition of your system is full, updates might fail and you might not be able to install new kernels.
Keep at least 2-3 versions: your current kernel and the most recent previous version as a backup.
To remove old kernels, do the following:
-
Check which kernel you're currently running.
uname -r
This command displays the version of the currently running kernel. For example:
6.6.8-290.current
Make note of this version.
-
Mount the boot partition.
sudo clr-boot-manager mount-boot
-
Check the partition's usage.
sudo du -d1 -h /boot
df -hThe commands display the disk usage of directories in
/boot
in human-readable format, and show overall disk space usage including the boot partition. -
List the installed kernels.
sudo clr-boot-manager list-kernels
The command shows the installed kernels. For example:
com.solus-project.current.6.6.8-290
com.solus-project.current.6.6.7-289
com.solus-project.current.6.6.6-288 -
Remove the kernels you don't need.
WarningNever remove the kernel your system is using. This is the version you noted in step 1.
sudo clr-boot-manager remove-kernel <kernel-name>
Replace
<kernel-name>
with the specific kernel version to remove. For example:sudo clr-boot-manager remove-kernel com.solus-project.current.6.6.6-288
-
Verify that space has been freed on the boot partition.
df -h