I'm getting this following error while I'm trying to install or uninstall any file. I have tried almost every solution I found on internet but still showing the same error.

Please do not say to install ubuntu again. I have lots of files which cannot be retrieved easily.


dpkg: unrecoverable fatal error, aborting:
 files list file for package 'avahi-autoipd' is missing final newline
E: Sub-process /usr/bin/dpkg returned an error code (2)

I'm also getting so many warning related to dpkg:


dpkg: warning: files list file for package 'linux-firmware' missing; assuming package has no files currently installed
dpkg: warning: files list file for package

i have tried the following

sudo mv /var/lib/dpkg/info/linux* ./ mv: cannot stat '/var/lib/dpkg/info/linux*': No such file or directory

sudo apt-get update ---- works fine sudo apt-get upgrade ---- gives dpkg error(above)

  • 1
    Seems like an exact duplicate of serverfault.com/questions/430682/…. Since this is likely among the "tried almost every solution," please edit your question to show us exactly how these solutions failed. – user535733 Feb 24 at 4:52
  • You haven't I feel provided the actual error message, only the summary which is a clue to look up the report to find what caused the error code reported by calling program. We can't help when we can't see your actual problems (only the end-summary) – guiverc Feb 24 at 4:54
  • maneela@ubuntu:~$ sudo mv /var/lib/dpkg/info/linux* ./ mv: cannot stat '/var/lib/dpkg/info/linux*': No such file or directory maneela@ubuntu:~$ sudo dpkg --configure -a maneela@ubuntu:~$ sudo apt update these two worked well... error has occurred during sudo apt upgrade ... error is same as above – Maneela Sirisety Feb 24 at 7:26

Your Answer

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

Browse other questions tagged or ask your own question.