Ubuntu: Can't install or remove packages


I'm getting this error:

dpkg: unrecoverable fatal error, aborting:   files list file for package `linux-image-extra-3.13.0-39-generic' contains empty filename  

I think it might have some thing to do with an old kernel, but I can't uninstall it with sudo apt-get remove or purge since it keeps erroring.


You can also try the following:

rm /var/lib/dpkg/info/linux-image-extra-3.13.0-39-generic.list

Then update your system.


Try this solution:

cd /var/lib/dpkg  


sudo cp diversions diversions.bak  sudo cp diversions-old diversions-old.bak  

Then make diversions back to old:

sudo cp diversions-old diversions  

Now try update:

sudo apt-get update  

Then re-install your package:

sudo apt-get install --reinstall packagename  

Another possible solution: Quoted from http://www.richud.com/wiki/Ubuntu_Dpkg:_unrecoverable_fatal_error

sudo gedit -w /var/lib/dpkg/status   

Remove the whole section of linux-image-extra-3.13.0-39-generic

Then run

sudo apt-get install -f  

You should then get still the initial errors "dpkg: warning: files list file for package `xxxxxxxxxxx' missing

Now run

sudo apt-get dist-upgrade  

Yet again you should see "dpkg: warning: files list file for package `xxxxxxxxxxx' missing, assuming package has no files currently installed.".

Now do this replacing xxxxxxx with all the package names above that appear.

sudo apt-get install --reinstall xxxxxxxxxx  

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »