Hi guys, I would like to share my experience when I got an error “No space left on device” after updating my Ubuntu. If you also found the same problem with me. Maybe you can try using my steps to solve this kind of problem. So what should we do are:
Check our /boot directory, is it full or not?
The result in my case is like in the picture below:
It means my “/boot” is full (100% used), so we should remove our old kernel, but before doing it we also should check our old kernels in the “/boot” directory. Using this command:
ls -la /boot
Remove old kernel using this command:
sudo rm /boot/initrd.img-X.XX.X-XX-generic
but you should change X.XX.X-XX with your own kernel version.
You can look into my case below:
After that try this command:
sudo apt-get -f install
again, then purge the package using this command:
sudo apt-get -y purge linux-image-X.XX.X-XX-generic
If you get another
No space left on device,then you should remove one or more initrd.img (refer to step 2-3) and try again.