1

error that says not enough space on boot

sudo apt-get -f autoremove

results in

0 upgraded, 0 newly installed, 0 to remove and 100 not upgraded.

I've manually removed all kernels (with sudo rm on /boot) except for 5.14.0-1033-oem that I've got from uname -a. This solved lack of space problem for a little bit, so I could run autoremove, and fix-broken (previously they were failing due to lack of space on /boot). But those commands brought a lot of kernels back and there is no space on boot again.

My previous post 0 bytes left on /boot, apt autoremove and apt --fix-broken install fail due to unmet dependencies was marked as answered in My /boot partition hit 100% and now I can't upgrade. Can't remove old kernels to make room , but in fact I've done everything from the linked answers just to come back to original situation.

Huxwell
  • 9
  • 2
  • 1
    Ubuntu automatically removes and deletes superseded kernels to free up space in /boot, so something else is wrong with your system if that automatic mechanism is not working. – user535733 May 25 '22 at 15:10

1 Answers1

-1

Ok, the answer was for me to do the whole exercise again.

To sum up the whole story:

  • first rm from boot every kernel related file, except for the one from uname -a
  • sudo apt autoremove , sudo apt --fix-broken install , sudo apt clean
  • now /boot is almost full again, because --fix-broken has put a lot of kernel files in /boot
  • again remove every kernel but uname -a
  • now I'm cool and I can run software updater without errors

This is a little bit counterintuitive but it worked.

Huxwell
  • 9
  • 2
  • 2
    You are describing brute-force methods that are not required. Instead, use `ls` to learn the kernels that are installed. Use `dpkg` to uninstall one of those extra kernel packages by name (it can do that, even if the partition is full).. Then use `apt` to uninstall the rest of the extra kernel packages by name (easier than using dpkg). Then `apt autoremove` and `apt autoclean` to tidy up. No need for `rm`. No need for `--fix-broken-install`. – user535733 May 25 '22 at 15:09