dpkg: dependency problems prevent configuration of initramfs-tools

Your system is in a state which I think should not happen: you have the new version of the dependency initramfs-tools-bin in the installed state, but the old version of the dependency initramfs-tools in a half-installed state. I'm not sure whether the problem is that APT is letting the system get into a state where it can't recover, dpkg is letting the system get into a state where it can't recover, the package maintainer used a combination of dependencies which isn't supported, or my limited understanding doesn't cover this case.

Try using dpkg directly:

dpkg --configure -a

If this still complains about dependencies, try

dpkg --configure -a --force-depends

If this works, you have the dpkg database in a consistent state. You need to get APT in a good state (which requires no broken dependencies):

apt-get -f install

After this you can resume normal upgrading.


If your purge of /boot was deleting old kernels that were in packages, you won't be able to remove the kernel packages anymore. You'll have to recreate the files. You can create empty files (touch `cat /var/lib/dpkg/info/linux-image-1.2.3-foo`) if you're removing the linux-image-1.2.3-foo package and you manually removed some of its files.


update-initramfs: Generating /boot/initrd.img-3.8.0-32-lowlatency

gzip: stdout: No space left on device

This means that you need to remove some kernels. Old, unused kernels are the best alternative.

sudo dpkg --purge linux-generic-someold-version

manually deleted older files and now some space is free

NO!

You should never manually remove anything. Ever. Only stuff from /home and /tmp that may be easily recoverable can me touched by hand, otherwise use the tools. That's the point of having DPKG/APT to your service. If you need to remove something use apt/dpkg instead and leave stuff done by hand as last alternative. I'm presuming your current problem is because of this.


To solve the dependency issue, you may downgrade, then upgrade:

sudo apt-get update
sudo apt-get -f install initramfs-tools=0.99ubuntu13 initramfs-tools-bin=0.99ubuntu13
sudo apt-get upgrade

By this point you should have told dpkg/apt to remove the old kernels too.