i have a problem on the apt-get command after installing:linux-image-rpi-rpfv and linux-headers-rpi-rpfv

 pi@raspberrypi:~ $ sudo apt-get -f install
    Reading package lists... Done
    Building dependency tree        
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    2 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Setting up linux-image-4.9.0-6-rpi (4.9.82-1+deb9u3+rpi1) ...
    No diversion 'diversion of /boot/vmlinuz-4.9.0-6-rpi by rpikernelhack', none removed.
    No diversion 'diversion of /boot/config-4.9.0-6-rpi by rpikernelhack', none removed.
    No diversion 'diversion of /boot/System.map-4.9.0-6-rpi by rpikernelhack', none removed.
    update-initramfs: Generating /boot/initrd.img-4.9.0-6-rpi

    gzip: stdout: No space left on device
    E: mkinitramfs failure cpio 141 gzip 1
    update-initramfs: failed for /boot/initrd.img-4.9.0-6-rpi with 1.
    run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
    dpkg: error processing package linux-image-4.9.0-6-rpi (--configure):
     subprocess installed post-installation script returned error exit status 1
    dpkg: dependency problems prevent configuration of linux-image-rpi-rpfv:
     linux-image-rpi-rpfv depends on linux-image-4.9.0-6-rpi; however:
      Package linux-image-4.9.0-6-rpi is not configured yet.

    dpkg: error processing package linux-image-rpi-rpfv (--configure):
     dependency problems - leaving unconfigured
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

2 Answers 2


Looks like you ran out of space on your SD card. You can type

df -h

in a terminal to verify.


To elaborate on the answer from @T.M.: you are using sudo apt-get -f install that means fix a broken installation. You have done an installation before that also terminated with an error. The important message here is:

gzip: stdout: No space left on device

That means what it says: your storage is full. There is no space left to update the initramfs by gzip. Look with: df -h what device has no space Avail and clean it up to get some more space.

Btw.: A default Raspbian installation do not use an init ramdisk. Maybe your special installation eats the storage space?

  • @PedroGuijas Your comment is unreadable. Please edit your question and insert the output.
    – Ingo
    Jan 12, 2019 at 10:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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