Ubuntu – Partial upgrade

13.10package-managementupdates

I didn't connect to the internet for about a week, then when I got connected to the internet I tried to update the system. I'm running Ubuntu 13.10. It said it needs partial upgrade. When I click partial upgrade, it says that the system is up-to-date and cancels.
When I click Continue, it says software index is broken. It is impossible to install or remove any software. Please use the Synaptic package manager or run sudo apt-get install -f in the terminal to fix the issue. At first I did that.

that's the results in the terminal:

The following packages will be removed:
  linux-image-3.11.0-12-generic linux-image-extra-3.11.0-12-generic
0 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
17 not fully installed or removed.
After this operation, 136 MB disk space will be freed.
Do you want to continue [Y/n]? "
i click y but it doesn't work .that's the outcome ...
"(Reading database ... 401370 files and directories currently installed.)
Removing linux-image-extra-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: splash: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-extra-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-extra-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.11.0-12-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
update-initramfs: Deleting /boot/initrd.img-3.11.0-12-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.11.0-12-generic /boot/vmlinuz-3.11.0-12-generic
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: splash: not found
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.11.0-12-generic.postrm line 328.
dpkg: error processing linux-image-3.11.0-12-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.11.0-12-generic
 linux-image-3.11.0-12-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Best Answer

Run the following commands in terminal,

sudo apt-get clean
sudo apt-get -f install

If you still getting errors, try to update your kernel by running the below command.

sudo apt-get install linux-generic
Related Question