When I try to install I get this error:

dpkg: unrecoverable fatal error, aborting:  files list file for package `fonts-tlwg-kinnari' contains empty filename
E: Sub-process /usr/bin/dpkg returned an error code (2)

And the installation is aborted.

I'm using Ubuntu 14.04


This is a bug reported at launchpad.

The error shown will be either:

files list file for package '*' is missing final newline


files list file for package '*' contains an empty filename

Where * start is a random but steady "per install" package name.


Donwload the .deb

sudo apt-get download fonts-tlwg-kinnari

Run this code

sudo dpkg -c /var/cache/apt/archives/fonts-tlwg-kinnari_1%3a0.5.1-3_all.deb  | awk '{if ($6 == "./") { print "/."; } \
else if (substr($6, length($6), 1) == "/") \
{print substr($6, 2, length($6) - 2); } \
else { print substr($6, 2, length($6) - 1);}}' > /var/lib/dpkg/info/fonts-tlwg-kinnari.list 

You can read more at launchpad

  • 2
    This is the best solution to the problem. I've been lazy and I've used the other solution but it may cause dpkg to loose track of some files in system directories (à la Windows, just to be clear). The "funny" part is that my linux-firmware.list has been partly overwritten by a Raspberry Pi file, cpu-feature-overrides.h. My system is not a RPi and it looks mostly ok (Smart is ok, dmesg is not crimson-red, etc). I still have to perform a memtest run, but this episode should just be the weird outcome of a sudden power loss...
    – Avio
    Jun 1 '18 at 15:56
  • This is also the one solution that helped me. Please note that it may be due to a filesystem corruption (raspberry pi in my case). The .list file contained some file entries but then some stuff that looked like log output. The reported file length was exactly the same for both files, unfortunately I deleted the corrupt .list file before checking again.
    – kay_D
    Jun 30 '19 at 15:35

Another option from Adrian's answer above is this:

sudo rm /var/lib/dpkg/info/fonts-tlwg-kinnari.list

and then

sudo apt-get install --reinstall fonts-tlwg-kinnari

Basically, this error means something got corrupted on your filesystem. It's a bad sign, and these list files are needed for the package manager to figure out what is and isn't safe to upgrade.

This regeneration of the list file is the best option, but it's not 100% safe.

Either way, keep in mind that something went wrong with your drive, and watch out for more errors.


Adrian Cid Almaguer's answer is the only thing that worked for me, the general idea being "recreate the missing file from the .deb package".

A note though: check first in /var/cache/apt/archives/ and /var/lib/dpkg/info to see if the .deb file already exists. If so, just use that instead of doing the sudo apt-get download.

Also, sudo dpkg ... | awk ... | sudo tee /var/lib/dpkg/info/example.list is likely to work better for most people; the sudo tee combination overcoming the permissions problem > redirection encounters.


I finally had some time to fix this on my own. For future reference

I moved all the linux* files to somewhere else. ex: ~/ (home) sudo mv /var/lib/dpkg/info/linux* ./

sudo dpkg --configure -a
sudo apt update
sudo apt upgrade

That fixed it

  • 2
    this did not solve the issue for me
    – byf-ferdy
    Oct 19 '18 at 10:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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