0

I have problem with installing new updates on my ubuntu. While researching I came up to my conclusion that /boot/ is full at 100%, not even auto-remove works (says run apt-fix install first) when i run apt-fix it errors.

apt fix error

boot full ls

2 Answers2

0

Use dpkg instead of apt to remove some of those packages.

Then try apt autoremove again.

user535733
  • 62,253
  • Not working, got any ideas? – Ahayosma Jan 29 '21 at 21:58
  • What exactly did you try? Please edit your question to show complete input and output. If all you tell us is "Not working," then all we can suggest in return is "wipe and reinstall." With greater detail, we can perhaps suggest a much less destructive course of action. Who knows? Maybe you simply made a typo. – user535733 Jan 29 '21 at 22:45
0

Your screenshot shows that old kernels have accumulated, filling up /boot with kernel images (/boot/vmlinuz*) and initial RAM disks (/boot/initrd.img*).

Typically you will want to keep the newest two or three and get rid of the others.

The clean and recommended way is to identify what package they belong to and then uninstall that package; e.g.

[sh @ balrog] ~ 1 % ls -lh /boot
total 103M
...
-rw-r--r-- 1 root root  39M Jan 29 15:03 initrd.img-4.15.0-134-generic
-rw-r--r-- 1 root root  39M Jan 29 15:05 initrd.img-4.15.0-135-generic
...
-rw------- 1 root root 8,0M Jan 15 11:32 vmlinuz-4.15.0-134-generic
-rw------- 1 root root 8,1M Jan 18 18:24 vmlinuz-4.15.0-135-generic

[sh @ balrog] ~ 2 % dpkg -S /boot/vmlinuz-4.15.0-134-generic linux-image-4.15.0-134-generic: /boot/vmlinuz-4.15.0-134-generic

And if you decide this is one you want to get rid of, uninstall it with

sudo dpkg -r linux-image-...

Notice that /boot/initrd.img* are not owned by any package because they are generated on the fly depending on what kernel modules you need in your current configuration, so dpkg -S on them will always return "no path found matching pattern..."; so concentrate on /boot/vmlinuz*.

After that, make sure to tell the bootloader about it:

sudo update-grub

Otherwise stale menu entries will remain in the Grub menu (until the next update bringing a new kernel which will also trigger this).

HTH

HuHa
  • 3,385