2

I've read various questions and the answers. I've tried a lot of stuff but I have been unable to erase any of the files within the boot partition. It's not letting me do anything because apparently, in the process of uninstalling something, it needs to install (I guess) the uninstaller. This process, considering there is no space left, shuts down the removal process. I've tried removing them one by one and in a bunch. I don't know what to do.

I'm attaching a copy of the screen.

I'm attaching a printout of "df -h" I do have extra space on the disk, except on '/boot', which is the one giving me trouble. I'm unable to install anything like Synaptic or Janitor because every time I try, it keeps telling me that there is no space available.

mauricio@FileServer:~$ df -h Filesystem Size Used Avail Use% Mounted on udev 2.0G 0 2.0G 0% /dev tmpfs 397M 6.8M 390M 2% /run /dev/mapper/FileServer--vg-root 70G 19G 47G 29% / tmpfs 2.0G 164K 2.0G 1% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 2.0G 0 2.0G 0% /sys/fs/cgroup /dev/sda1 236M 230M 0 100% /boot cgmfs 100K 0 100K 0% /run/cgmanager/fs tmpfs 397M 52K 397M 1% /run/user/1000 /home/mauricio/.Private 70G 19G 47G 29% /home/mauricio

If deletion is a problem, is there a way to move those files to the partition that has 47G? Once done that, it might let me install Synaptic and then remove them completely. mauricio@FileServer:~$ sudo apt-get purge linux-image-3.19.0.32-generic Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'linux-image-3.19.0-32-generic' for regex 'linux-image-3.19.0.32-generic' Package 'linux-image-3.19.0-32-generic' is not installed, so not removed The following packages were automatically installed and are no longer required: linux-headers-3.19.0-28 linux-headers-3.19.0-28-generic linux-image-3.19.0-28-generic linux-image-extra-3.19.0-28-generic Use 'apt-get autoremove' to remove them. The following packages will be REMOVED: linux-image-extra-3.19.0-30-generic linux-image-extra-3.19.0-68-generic 0 upgraded, 0 newly installed, 2 to remove and 250 not upgraded. 4 not fully installed or removed. After this operation, 240 MB disk space will be freed. Do you want to continue? [Y/n] y (Reading database ... 429896 files and directories currently installed.) Removing linux-image-extra-3.19.0-30-generic (3.19.0-30.34) ... depmod: FATAL: could not load /boot/System.map-3.19.0-30-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic update-initramfs: Generating /boot/initrd.img-3.19.0-30-generic grep: /boot/config-3.19.0-30-generic: No such file or directory depmod: WARNING: could not open /tmp/mkinitramfs_63yTe9/lib/modules/3.19.0-30-generic/modules.order: No such file or directory depmod: WARNING: could not open /tmp/mkinitramfs_63yTe9/lib/modules/3.19.0-30-generic/modules.builtin: No such file or directory run-parts: executing /etc/kernel/postinst.d/pm-utils 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic run-parts: executing /etc/kernel/postinst.d/update-notifier 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.19.0-30-generic /boot/vmlinuz-3.19.0-30-generic Generating grub configuration file ... Found linux image: /boot/vmlinuz-3.19.0-28-generic Found linux image: /boot/vmlinuz-3.19.0-26-generic Found initrd image: /boot/initrd.img-3.19.0-26-generic Found linux image: /boot/vmlinuz-3.19.0-25-generic Found initrd image: /boot/initrd.img-3.19.0-25-generic Found linux image: /boot/vmlinuz-3.19.0-23-generic Found initrd image: /boot/initrd.img-3.19.0-23-generic Found linux image: /boot/vmlinuz-3.19.0-22-generic Found initrd image: /boot/initrd.img-3.19.0-22-generic Found linux image: /boot/vmlinuz-3.19.0-15-generic Found initrd image: /boot/initrd.img-3.19.0-15-generic Found memtest86+ image: /memtest86+.elf Found memtest86+ image: /memtest86+.bin done Removing linux-image-extra-3.19.0-68-generic (3.19.0-68.76) ... depmod: FATAL: could not load /boot/System.map-3.19.0-68-generic: No such file or directory run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic update-initramfs: Generating /boot/initrd.img-3.19.0-68-generic grep: /boot/config-3.19.0-68-generic: No such file or directory depmod: WARNING: could not open /lib/modules/3.19.0-68-generic/modules.order: No such file or directory depmod: WARNING: could not open /lib/modules/3.19.0-68-generic/modules.builtin: No such file or directory depmod: WARNING: could not open /tmp/mkinitramfs_AdGJ3X/lib/modules/3.19.0-68-generic/modules.order: No such file or directory depmod: WARNING: could not open /tmp/mkinitramfs_AdGJ3X/lib/modules/3.19.0-68-generic/modules.builtin: 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.19.0-68-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-68-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.19.0-68-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
mauricio@FileServer:~$ dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p' | xargs sudo apt-get -y purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-28 linux-headers-3.19.0-28-generic linux-image-3.19.0-28-generic linux-image-extra-3.19.0-28-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-3.19.0-15-generic* linux-image-3.19.0-22-generic* linux-image-3.19.0-23-generic* linux-image-3.19.0-25-generic*
  linux-image-extra-3.19.0-15-generic* linux-image-extra-3.19.0-22-generic* linux-image-extra-3.19.0-23-generic*
  linux-image-extra-3.19.0-25-generic* linux-image-extra-3.19.0-68-generic
0 upgraded, 0 newly installed, 9 to remove and 250 not upgraded.
3 not fully installed or removed.
After this operation, 745 MB disk space will be freed.
(Reading database ... 429896 files and directories currently installed.)
Removing linux-image-extra-3.19.0-68-generic (3.19.0-68.76) ...
depmod: FATAL: could not load /boot/System.map-3.19.0-68-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-68-generic
grep: /boot/config-3.19.0-68-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_qJmuNX/lib/modules/3.19.0-68-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_qJmuNX/lib/modules/3.19.0-68-generic/modules.builtin: 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.19.0-68-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-68-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.19.0-68-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
mauricio@FileServer:~$ echo $(dpkg --list | grep linux-image | awk '{ print $2 }' | sort -V | sed -n '/'`uname -r`'/q;p') $(dpkg --list | grep linux-headers | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p') | xargs sudo apt-get -y purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-headers-3.19.0-28 linux-headers-3.19.0-28-generic linux-image-3.19.0-28-generic linux-image-extra-3.19.0-28-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-headers-3.19.0-15* linux-headers-3.19.0-15-generic* linux-headers-3.19.0-22* linux-headers-3.19.0-22-generic*
  linux-headers-3.19.0-23* linux-headers-3.19.0-23-generic* linux-headers-3.19.0-25* linux-headers-3.19.0-25-generic*
  linux-image-3.19.0-15-generic* linux-image-3.19.0-22-generic* linux-image-3.19.0-23-generic* linux-image-3.19.0-25-generic*
  linux-image-extra-3.19.0-15-generic* linux-image-extra-3.19.0-22-generic* linux-image-extra-3.19.0-23-generic*
  linux-image-extra-3.19.0-25-generic* linux-image-extra-3.19.0-68-generic
0 upgraded, 0 newly installed, 17 to remove and 250 not upgraded.
3 not fully installed or removed.
After this operation, 1,064 MB disk space will be freed.
(Reading database ... 429896 files and directories currently installed.)
Removing linux-image-extra-3.19.0-68-generic (3.19.0-68.76) ...
depmod: FATAL: could not load /boot/System.map-3.19.0-68-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-68-generic
grep: /boot/config-3.19.0-68-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_Mv7Ib3/lib/modules/3.19.0-68-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_Mv7Ib3/lib/modules/3.19.0-68-generic/modules.builtin: 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.19.0-68-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-68-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.19.0-68-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
mauricio@FileServer:~$ dpkg -l 'linux-*' | sed '/^ii/!d;/'"$(uname -r | sed "s/\(.*\)-\([^0-9]\+\)/\1/")"'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'|grep -E "(image|headers)" | xargs sudo apt-get -y purge
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  linux-image-3.19.0-28-generic linux-image-extra-3.19.0-28-generic
Use 'apt-get autoremove' to remove them.
The following packages will be REMOVED:
  linux-headers-3.19.0-15* linux-headers-3.19.0-15-generic* linux-headers-3.19.0-22* linux-headers-3.19.0-22-generic*
  linux-headers-3.19.0-23* linux-headers-3.19.0-23-generic* linux-headers-3.19.0-25* linux-headers-3.19.0-25-generic*
  linux-headers-3.19.0-28* linux-headers-3.19.0-28-generic* linux-headers-3.19.0-30* linux-headers-3.19.0-30-generic*
  linux-headers-3.19.0-31* linux-headers-3.19.0-31-generic* linux-headers-3.19.0-32* linux-headers-3.19.0-32-generic*
  linux-headers-3.19.0-68* linux-headers-3.19.0-68-generic* linux-headers-generic* linux-image-3.19.0-15-generic*
  linux-image-3.19.0-22-generic* linux-image-3.19.0-23-generic* linux-image-3.19.0-25-generic*
  linux-image-extra-3.19.0-15-generic* linux-image-extra-3.19.0-22-generic* linux-image-extra-3.19.0-23-generic*
  linux-image-extra-3.19.0-25-generic* linux-image-extra-3.19.0-68-generic
0 upgraded, 0 newly installed, 28 to remove and 250 not upgraded.
3 not fully installed or removed.
After this operation, 1,464 MB disk space will be freed.
(Reading database ... 429896 files and directories currently installed.)
Removing linux-image-extra-3.19.0-68-generic (3.19.0-68.76) ...
depmod: FATAL: could not load /boot/System.map-3.19.0-68-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.19.0-68-generic /boot/vmlinuz-3.19.0-68-generic
update-initramfs: Generating /boot/initrd.img-3.19.0-68-generic
grep: /boot/config-3.19.0-68-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_5SBtjc/lib/modules/3.19.0-68-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_5SBtjc/lib/modules/3.19.0-68-generic/modules.builtin: 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.19.0-68-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.19.0-68-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.19.0-68-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
  • can you post the output of df -h ? – bistoco Sep 20 '16 at 4:04
  • Please re-read your post. To put in code our output, insert four spaces at front of each line. Then consider doing what I recommended to clear space out of /boot WITHOUT using apt-get. – pauljohn32 Sep 21 '16 at 4:15
1

Check the free space on your boot partition df -h. Freeing up some space or resizing the partition larger may be necessary based on your output "gzip: stdout: No space left on device"

1

I first thought that @GrannySez's points you in right direction. That may still be right. Possibly whole drive is full, or /var or /boot partitions. If you did the old fashioned "everything in a separate partition", now you see damage. On the other hand, if you have everything in one giant partition in /, then you see danger of allowing /home or /tmp to fill up with crap.

Upon re-reading your message, I think your command line is typed incorrectly. You have the package name wrong. If you look in the output more carefully, you'd need to remove something named this:

linux-image-3.19.0-28-generic

But in your command line, you have "0.28" toward the end. Look at your output, you'll see what I mean.

That kind of typo is frustrating. If apt-get was working for you, I'd say "install synaptic, a nice GUI package manager". It is easier to get rid of packages with it because it takes care of the spelling. But since apt-get is stuck, I suspect that won't work now.

First, suppose you have ample space in /, /var, and /tmp. And /boot is full. "df" will tell you if you have /boot. This is, actually, the best case scenario! It seems a little unlikely to me because the default install will, these days, not have separate /boot.

I keep 2 old kernels. In shell run 'dpkg -l | grep linux-image' to get list of all kernels you have. That will print out the full names which you can copy/paste into commands that will remove extra kernels.

I suggest using dpkg --purge, not apt-get, to remove the old ones. I worry the apt-get package database may be in a bad state. I'd run dpkg directly, bypassing the apt-get subsystem altogether.

dpkg --purge linux-image-4.4.0-32-generic

I believe I typed this correctly. That kind of thing will fix the problem entirely if you have the "/boot" is too full problem. I generally keep 2 old kernels in my systems.

By the way, did that "autoremove" function recommended in the apt-get output work? I fear it will fail because apt-get can't claim the free space it needs to work on the package database.

When /boot is full, and you cannot get the system to clean it out of you, your last desperate act is to open /boot and look at what you have. If you see lots of "vmlinuz**" files, you'll know. If you run "ls -la", you may be stunned to see a lot of giant files "initrd.img-*". When the package manager is failing, I have sometimes manually deleted files, and then later. That's a last, desperate act,however. Those initrd files have become so huge and the old ones serve no purpose.

If you do have the completely full disk, not just a /boot partition, it is important to clear space ASAP, otherwise you will likely have a kernel panic soon and lots of vital record-keeping systems will fail. I'm afraid it will have failed by the time I post this.

Delete some stuff, quick :). If /home is not in a separate partition, you may find that one of your users filled the whole / partition by filling up /home up with old copies of Star Wars. /tmp might fill up with old trash too.

  • I added some text to the original question with some of the output. I tried the dpkg but "dependency problems prevent removal of..." Thanks. – Francisco Scaramanga Sep 20 '16 at 14:53
  • look in /boot, inspect some files, see if you have too many, and you must remove some in order to get this straight. If you want to get radical and just nuke old copies of vmlinuz and initrd, OK! If the system is corrupted to such an extent that dpkg and apt-get can't do it, then you have to do something. – pauljohn32 Sep 21 '16 at 4:18

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.