Friday 4 October 2024

ubuntu /boot drive full

 https://askubuntu.com/questions/89710/how-do-i-free-up-more-space-in-boot

How do I free up more space in /boot?


One command to show all kernels and headers that can be removed, excluding the current running kernel:

kernelver=$(uname -r | sed -r 's/-[a-z]+//')
dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve $kernelver

udo apt-get purge $(dpkg -l linux-{image,headers}-"[0-9]*" | awk '/ii/{print $2}' | grep -ve "$(uname -r | sed -r 's/-[a-z]+//')")

No comments:

Post a Comment