dpkg: error processing package linux-image-generic (--configure): dependency problems - leaving unconfigured [duplicate]

I had this issue just now. What I did was purge the errant package using dpkg in my case then update and force the reinstall:

sudo dpkg --purge linux-image-3.13.0-35-generic
sudo apt-get update
sudo apt-get -f install

The installation process may take a bit longer, but it worked in the end.


Your problem is:

update-initramfs: Generating /boot/initrd.img-3.16.0-43-generic

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1

Solution:

apt-get autoremove

For me the solution was different.

I used the command sudo aptitude, when the graphical menu appeared I used / to get a pop-up search field and find all the linux-header, linux-image, linux-server versions and removed all but the one currently not used by pressing -.

To find the current kernel version I used uname -r.

Finally I installed a newer version of linux-{header, image, server} in the order specified by selecting them and pressing +.

To confirm the updates I used u.

At the end I rebooted and everything was fixed.