I had a problem with python-debian package with Lubuntu 18.04 and I reinstalled it. After that I get a lot of:

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

I reinstalled a lot of them with apt-get install --reinstall PACKAGE1 PACKAGE2 etc, but a bunch of them I can't reinstall:

Reinstallation of PACKAGE is not possible, it cannot be downloaded.

I think it's because these packages are old or manually installed from source (as llvm-10). These packages are anyway installed and working.

How can I get rid of these annoying warnings?


Currently, GChuf's answer worked, but I still have the warnings for these packages:


and they depends from packages I don't have the bravery to pass to dpkg -r

  • FYI: Lubuntu 18.04 LTS is no longer supported; refer lubuntu.me/bionic-eol or fridge.ubuntu.com/2020/08/14/ubuntu-18-04-5-lts-released where you'll note only Ubuntu Server, Ubuntu Desktop & Ubuntu Cloud come with 5 years of support; flavors had shorter lives. I'd suggest using ubuntu-support-status to assess the security status of your actual install. Your question is still on-topic here, but consider how much security matters to you and the results of prior command. You're now using Ubuntu 18.04 LTS with LXDE (not Lubuntu).
    – guiverc
    Feb 19, 2023 at 12:18
  • @guiverc "Lubuntu 18.04 LTS is no longer supported" I quite know :) Feb 20, 2023 at 19:00
  • How did you reinstall the packages?
    – GChuf
    Feb 27, 2023 at 13:27
  • @GChuf I reinstalled the packages with apt-get install --reinstall PACKAGE1 PACKAGE2 etc. This did not work with the packages I'm asking help Feb 27, 2023 at 18:58
  • Just to be clear, what is the actual thing you want to solve? Successfully reinstall all missing packages, or get rid of dpkg warnings?
    – GChuf
    Feb 28, 2023 at 9:00

2 Answers 2




Short explaination:

dpkg -r removes an installed package without removing the config files.

In this case, dpkg -r did not perform a real "uninstall", since the packages were not installed through dpkg or apt.

It simply removed some leftover files or entries on Marco's PC - I wasn't able to find the information on where these entries could be stored other than under "/var/lib/dpkg/info".

There may be other explainations possible, and I don't know how exactly this situation would happen in the first place.

Not sure if any of these will help you, but it's worth a try.

Check if dpkg sees the packages:

dpkg -l '*python3.5*'

mark to remove:

dpkg-remove PACKAGE_NAME

remove or purge through dpkg:

dpkg -r python3.5
dpkg -P python3.5

Double check if there are any files in /var/lib/dpkg/info

ls -al /var/lib/dpkg/info/ | grep python3

Clean packages thorugh apt-get:

sudo apt-get autoclean

sudo apt-get autoremove

sudo apt-get clean

I've also come across this bash script: https://github.com/epinna/Unusedpkg

If anything happened, reboot the PC afterwards.


I can find all of these 4 packages through apt on ubuntu 20:


I suggest you simply try to reinstall these 4.

  • 1
    dpkg -r worked. It left only some packages, I'll remove the warnings for them with relax :) Feb 28, 2023 at 13:06
  • I'm glad! I accepted your edit as well.
    – GChuf
    Feb 28, 2023 at 13:39
  • P.S. if the bounty is still available, I'd gladly accept it, thank you!
    – GChuf
    Feb 28, 2023 at 13:40
  • 1
    Great! Could you please explain why or how the dpkg -r removed the warnings; and would be appreciated if you include why the error message generate in the first place... It would attract votes and add content to your answer making it more trustable.
    – Error404
    Feb 28, 2023 at 13:44
  • 1
    Worth noticing, that the post installation scripts and the pre installation scripts along with the lists files of the packages are stored in var/lib/dpkg/info; since those files were missing, dpkg threw warnings related to the same (surprisingly, someone or some packages had manually removed those files); dpkg -r or even better dpkg -P just completely remove the package, so no installation candidate is sustained, so dpkg just assumes that those packages were never installed and stopped the warnings. Also, the packages are crucial and I suggest @MarcoSulla to reinstall them.
    – Error404
    Mar 1, 2023 at 11:59

Try clean the dpkg package list cache using commands:

    sudo dpkg --clear-avail
    sudo apt-get update

If the warning messages persist, try remove the package's files list manually like this:

    sudo rm /var/lib/dpkg/info/<PACKAGE>.list
  • --clear-avail did not worked, and there's no file for problematic packages in /var/lib/dpkg/info/ Feb 25, 2023 at 19:43
  • what do you get when try reinstall? upgrade the package? Feb 26, 2023 at 16:34
  • I can't reinstall because they are no more present in the repository (there's python3.5 for example). I could remove them, but they are not listed by autoremove and I do not want to mess up things (more than that...) Feb 26, 2023 at 20:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .