0

I have searched online and I have followed suggestions in Terminal, none of have worked for me. Below is issue I am having. Seems as though code to purge old kernels is broken, but to fix it I need to have more space, which is my entire purpose to begin with. I am very much new to Linux and am by no means a coder, so please be plain with me.

$ sudo apt autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
    linux-image-extra-4.13.0-36-generic : Depends: linux-image-4.13.0-36-generic but it is not installed
    linux-image-generic-hwe-16.04 : Depends: linux-image-4.13.0-36-generic but it is not installed
    linux-signed-image-4.13.0-36-generic : Depends: linux-image-4.13.0-36-generic (= 4.13.0-36.40~16.04.1) but it is not installed
E: Unmet dependencies. Try using -f.
hunter@hunter-Satellite-C55-C:~$ apt-get -f install
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
    libllvm4.0 linux-headers-4.10.0-35 linux-headers-4.10.0-35-generic
    linux-headers-4.10.0-37 linux-headers-4.10.0-37-generic
    linux-headers-4.10.0-40 linux-headers-4.10.0-40-generic
    linux-headers-4.10.0-42 linux-headers-4.10.0-42-generic
    linux-headers-4.13.0-26 linux-headers-4.13.0-26-generic
    linux-image-4.10.0-35-generic linux-image-4.10.0-37-generic
    linux-image-4.10.0-40-generic linux-image-4.10.0-42-generic
    linux-image-4.13.0-26-generic linux-image-extra-4.10.0-35-generic
    linux-image-extra-4.10.0-37-generic linux-image-extra-4.10.0-40-generic
    linux-image-extra-4.10.0-42-generic linux-image-extra-4.13.0-26-generic
    linux-signed-image-4.10.0-35-generic linux-signed-image-4.10.0-37-generic
    linux-signed-image-4.10.0-40-generic linux-signed-image-4.10.0-42-generic
    linux-signed-image-4.13.0-26-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
    linux-image-4.13.0-36-generic
Suggested packages:
    fdutils linux-tools
The following NEW packages will be installed:
    linux-image-4.13.0-36-generic
0 upgraded, 1 newly installed, 0 to remove and 110 not upgraded.
78 not fully installed or removed.
Need to get 0 B/21.0 MB of archives.
After this operation, 72.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 452182 files and directories currently installed.)
Preparing to unpack .../linux-image-4.13.0-36-generic_4.13.0-36.40~16.04.1_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
Done.
Unpacking linux-image-4.13.0-36-generic (4.13.0-36.40~16.04.1) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.13.0-36-generic_4.13.0-36.40~16.04.1_amd64.deb (--unpack):
    cannot copy extracted data for './boot/System.map-4.13.0-36-generic' to '/boot/System.map-4.13.0-36-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.13.0-36-generic /boot/vmlinuz-4.13.0-36-generic
Errors were encountered while processing:
    /var/cache/apt/archives/linux-image-4.13.0-36-  generic_4.13.0-36.40~16.04.1_amd64.deb
        E: Sub-process /usr/bin/dpkg returned an error code (1)
1

Since you have run out of space, apt won't run; and thus, any automated fix will also fail. You need to manually free up some space in the /boot/ directory. One way to do this is delete the system maps for the kernels you are going to remove. If this doesn't give enough room, delete the initrd for some of the kernels. Note: you will need root privelage to remove files in /boot/.

  • any links you can provide on how to do that? Like I said I am using this cause its free and legally so. I am still not up to par on ins and outs of fixing this stuff. Trying to learn though. – Hunter Mar 19 '18 at 21:43

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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