How to Fix ‘dpkg: warning: files list file for package missing’ in Ubuntu

Running package management operations such as sudo apt update, sudo apt upgrade, or installing software in Ubuntu only to see dozens of warnings: dpkg: warning: files list file for package 'xyz' missing; assuming package has no files currently installed clutters terminal logs. While the package manager proceeds with installation, these warnings indicate that the Debian package database (dpkg) has lost its file manifest lists inside /var/lib/dpkg/info/. Without these .list records, dpkg cannot verify which binary executables, man pages, or library assets belong to the package, preventing clean package removals and future system upgrades.

Why Does dpkg Report Missing Files List Files?

Each installed package in Ubuntu stores an inventory list file at /var/lib/dpkg/info/<package>.list. The warning occurs because:

  • Abrupt System Shutdowns: Hard power loss or kernel panics while APT or unattended-upgrades was actively writing metadata.
  • Filesystem Corruption: Inode damage on the ext4 or btrfs root partition leading to orphaned zero-byte metadata files.
  • Accidental Manual Deletion: Scripts clearing /var/lib/dpkg/info/ to resolve locked package states.
  • Interrupted Package Upgrades: Network drops during distribution release upgrades (e.g. Ubuntu 22.04 LTS to 24.04 LTS).

Step 1: Identify Missing .list Files Automatically

Generate a clean list of all affected package names throwing missing file list warnings.

  1. Open your Terminal (Ctrl + Alt + T).
  2. Run a dry-run package operation and capture the warning lines into a text file:
    sudo apt-get --reinstall install $(dpkg --get-selections | grep -v deinstall | awk '{print $1}') 2>&1 | grep "files list file for package" | awk -F"'" '{print $2}' | sort -u > /tmp/missing_packages.txt
  3. Inspect the extracted package names:
    cat /tmp/missing_packages.txt

Step 2: Recreate Empty Dummy .list Files to Suppress Warnings

Creating empty .list files immediately restores dpkg database integrity, allowing APT to complete upgrades.

  1. Execute the following shell loop to generate touch files for all missing packages:
    for pkg in $(cat /tmp/missing_packages.txt); do sudo touch /var/lib/dpkg/info/${pkg}.list; done
  2. Verify that the warning no longer appears by updating package indexes:
    sudo apt update

Step 3: Reinstall Affected Packages to Populate File Manifests

While empty dummy files silence warnings, reinstalling the packages restores authentic file inventories.

  1. Reinstall all identified packages from official Ubuntu mirrors:
    sudo apt-get install --reinstall $(cat /tmp/missing_packages.txt)
  2. APT will download the official .deb archives, unpack the binaries, and write accurate .list manifests into /var/lib/dpkg/info/.
  3. Verify that one of the files now contains full inventory data:
    head -n 10 /var/lib/dpkg/info/$(head -n 1 /tmp/missing_packages.txt).list

Step 4: Clean Corrupted APT Caches and Fix Broken Dependencies

Ensure the local package cache is clean of damaged archives.

  1. Clean out stale package archives from the local cache:
    sudo apt clean
    sudo apt autoclean
  2. Repair any broken dependencies:
    sudo apt --fix-broken install
  3. Configure unconfigured packages:
    sudo dpkg --configure -a

Step 5: Run Filesystem Check on Root Partition

If missing files occurred after a system freeze, check disk health to prevent recurring database corruption.

  1. Check SMART disk diagnostic parameters:
    sudo smartctl -H /dev/sda
  2. Force an fsck scan on the next system restart:
    sudo touch /forcefsck
  3. Reboot your system to let the Linux kernel verify partition blocks:
    sudo reboot

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.