0

Recently, I have been experiencing a problem with my Ubuntu system. Whenever I try installing a new software or updating my system I receive an error complaining that there are not enough space. I looked up this issue and it is apparently related to my /boot partition which is full.

Since I can not install any software on my system, I need to delete the old kernel files manually. I have tried different methods to do so, but still I receive some errors that does not let me to delete the kernel files.

The last method that I tried was the following command:

sudo apt-get autoremove linux-image-3.16.0-30-generic

The following lines are the last things which are printed out in the terminal:

Removing p11-kit (0.20.2-2ubuntu2) ...
Removing p11-kit-modules:amd64 (0.20.2-2ubuntu2) ...
Removing libgnustep-base1.24 (1.24.0-1ubuntu3) ...
Removing gnustep-base-common (1.24.0-1ubuntu3) ...
Removing gnustep-common (2.6.2-2.1ubuntu1) ...
Removing libobjc4:amd64 (4.8.4-2ubuntu1~14.04.3) ...
Processing triggers for libc-bin (2.19-0ubuntu6.11) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up initramfs-tools (0.103ubuntu4.7) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-firmware (1.127.23) ...
update-initramfs: Generating /boot/initrd.img-3.16.0-76-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-73-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-71-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-62-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-59-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-57-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-53-generic
grep: /boot/config-3.16.0-53-generic: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.16.0-52-generic
grep: /boot/config-3.16.0-52-generic: No such file or directory
update-initramfs: Generating /boot/initrd.img-3.16.0-51-generic
grep: /boot/config-3.16.0-51-generic: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-51-generic with 1.
dpkg: error processing package linux-firmware (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up linux-image-extra-3.16.0-76-generic (3.16.0-76.98~14.04.1) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.0-76-generic /boot/vmlinuz-3.16.0-76-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.0-76-generic /boot/vmlinuz-3.16.0-76-generic
update-initramfs: Generating /boot/initrd.img-3.16.0-76-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-76-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.16.0-76-generic (--configure):
 subprocess installed post-installation script returned error exit status 1
Processing triggers for initramfs-tools (0.103ubuntu4.7) ...
update-initramfs: Generating /boot/initrd.img-3.16.0-76-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.16.0-76-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 linux-firmware
 linux-image-extra-3.16.0-76-generic
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)
kelvinelove
  • 1,617
  • 1
  • 16
  • 26
Parisa
  • 1

1 Answers1

0

There are a number of ways to clean up unused or obsolete kernels.

If all you have is the terminal have a look at this posting How do I remove old kernel versions to clean up the boot menu?

Personally I use synaptic to ensure all my packages are upto date, you may want to look at it too after sorting out your boot partition.