The problem stems from running out of disk space on /boot
after doing too many updates. I'm doing sudo apt update && sudo apt upgrade && sudo apt dist-upgrade
and every time the linux-image updates I run sudo apt autoremove
to free up space. I thought that this command removes unused linux-image-x.x.x-xx-generic
from the system. Unfortunately I started running into issues with disk space when upgrading and I found this solution which works, but it's really annoying having to do this manual delete of the linux-image-x.x.x-xx-generic
every time. So for example I have this command
dpkg -l | grep linux-image
rc linux-image-5.13.0-27-generic 5.13.0-27.29~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-28-generic 5.13.0-28.31~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.13.0-30-generic 5.13.0-30.33~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.13.0-35-generic 5.13.0-35.40~20.04.1 amd64 Signed kernel image generic
ii linux-image-5.13.0-37-generic 5.13.0-37.42~20.04.1 amd64 Signed kernel image generic
rc linux-image-5.8.0-43-generic 5.8.0-43.49~20.04.1 amd64 Signed kernel image generic
ii linux-image-generic-hwe-20.04 5.13.0.37.42~20.04.22 amd64 Generic Linux kernel image
After doing
uname -r
5.13.0-35-generic
I uninstall the one's that I'm not using like in the solution I found, but this is really annoying. Is this a bug in Ubuntu or is something broken in my system?
sudo apt autoremove --purge
to avoid this problem. – Pachuca Mar 23 '22 at 15:59rc
). You can--purge
all you like, and those lines will still be there, still correctly showing that the packages have been removed. Whether or not config data is retained is irrelevant to your space problem -- config files are retained in/etc
, not/boot
. – user535733 Mar 23 '22 at 16:29