How to fix dpkg: warning: files list file for package 'package-name' missing in APT

APTBEGINNERMEDIUMUpdated Oct 20, 2026ยท 409 views

This warning occurs when dpkg cannot find the .list file for an installed package in /var/lib/dpkg/info/. The issue typically happens after interrupted package installations or corrupted package metadata. Reinstalling the affected package or running package repair commands usually resolves it.

Quick fix

Fixes dpkg: warning: files list file for package 'package-name' missing

sudo apt-get install --reinstall package-name
  1. Reinstall the affected package
  2. Run package repair commands
  3. Create an empty .list file (quick workaround)
  4. Purge and remove problematic packages
apt โ€” error
sudo apt-get install --reinstall package-name
dpkg: warning: files list file for package 'package-name' missing

What this error means

The dpkg package manager maintains a database of installed packages in `/var/lib/dpkg/`. For each package, it stores metadata including a `.list` file that contains the complete list of files that package installed on the system. When dpkg encounters a package without its corresponding `.list` file, it issues the warning: "dpkg: warning: files list file for package 'X' missing; assuming package has no files currently installed." This warning indicates: 1. **Metadata corruption**: The package's `.list` file in `/var/lib/dpkg/info/` is missing or inaccessible 2. **Incomplete installation**: A package installation was interrupted before the metadata could be fully written 3. **Database inconsistency**: The dpkg database no longer accurately represents what's installed on the system While the warning doesn't always prevent the package from functioning, it can cause issues with package removal, upgrades, and dependency resolution. The warning typically appears only once when dpkg first encounters the missing file, then reappears if the issue persists.

Typical symptoms

  • See warning message: 'dpkg: warning: files list file for package missing'
  • Warning appears during apt install, apt upgrade, or dpkg operations
  • apt autoremove or package removal fails for the affected package
  • System shows inconsistent package status between apt and dpkg
  • apt-get install -f hangs or reports errors about missing packages
  • Warning repeats each time dpkg is invoked for package operations
  • Cannot upgrade or remove the affected package cleanly

Common causes

  1. Package installation was interrupted before the .list file was created (power loss, killed process, disk full)
  2. Manual deletion of .list files from /var/lib/dpkg/info/ directory
  3. Corrupted or incomplete package download that was force-installed
  4. Failed package removal that didn't clean up metadata properly
  5. Filesystem corruption affecting the /var/lib/dpkg directory
  6. Recent changes to openssl or system libraries that affected package metadata
  7. Manual editing or removal of package metadata files

How to fix "dpkg: warning: files list file for package 'package-name' missing"

1Reinstall the affected package

The simplest solution is to reinstall the affected package, which will recreate the missing .list file:

bash
sudo apt-get install --reinstall package-name

Replace package-name with the actual package name from the warning message. This downloads the package again and reinstalls it, recreating all metadata including the .list file.

If you have multiple packages with this issue, you can reinstall them all at once:

bash
sudo apt-get install --reinstall package1 package2 package3

After reinstallation, the warning should disappear completely.

2Run package repair commands

If reinstalling doesn't work or if you have multiple packages affected, try running dpkg repair commands:

bash
# Configure packages that may be partially installed
sudo dpkg --configure -a

# Fix broken dependencies
sudo apt-get install -f

# Clean up and update package cache
sudo apt-get clean
sudo apt-get update

Run these commands in order. They will:
1. Complete any partially configured packages
2. Install missing dependencies or fix broken installations
3. Clear cached package files
4. Refresh the package index

If any of these commands report errors, they'll also suggest which packages to fix next.

3Create an empty .list file (quick workaround)

If the affected package is not critical and you need a quick fix, you can create an empty .list file:

bash
sudo touch /var/lib/dpkg/info/package-name.list

Important notes:
- This is a temporary workaround, not a proper fix
- The package will be registered as having no files installed
- You may encounter issues when uninstalling the package later
- Use this only if the package is optional or you plan to remove it soon

A proper fix is to reinstall the package afterward:

bash
# Temporary fix
sudo touch /var/lib/dpkg/info/package-name.list

# Then properly fix it by reinstalling
sudo apt-get install --reinstall package-name
4Purge and remove problematic packages

If the package is no longer needed or continues causing problems, remove it completely:

bash
# Remove the package and all configuration files
sudo apt-get purge package-name

# Optionally, remove unnecessary dependencies
sudo apt-get autoremove

The purge command removes the package and its configuration. The autoremove command removes packages that were installed as dependencies but are no longer needed.

Warning: This deletes the package and its settings. Only use this if you don't need the package anymore.

5Recover from dpkg database backup

If dpkg corruption is extensive, you can restore from a backup:

bash
# Check if backup exists
ls -la /var/backups/dpkg*

# Restore from the most recent backup (if available)
sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status
sudo cp /var/backups/dpkg.diversions.0 /var/lib/dpkg/diversions
sudo cp /var/backups/dpkg.statoverride.0 /var/lib/dpkg/statoverride

# Reconfigure all packages
sudo dpkg --configure -a

# Update and fix dependencies
sudo apt-get update
sudo apt-get install -f

dpkg automatically maintains backups of its database in /var/backups/. If you've experienced corruption, restoration can help recover a consistent state.

Caution: This restore operation can change your system state significantly. Only use this if other methods have failed and you understand the implications.

6Fix multiple packages with a script

If you have many packages with this issue, use a script to fix them all:

bash
#!/bin/bash

# Find all packages with missing .list files and reinstall them
for package in $(apt list --installed 2>/dev/null | cut -d'/' -f1); do
    if [ ! -f /var/lib/dpkg/info/${package}.list ]; then
        echo "Fixing: $package"
        sudo apt-get install --reinstall $package -y
    fi
done

# Run final cleanup
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt-get clean

Save this as fix-dpkg.sh, make it executable (chmod +x fix-dpkg.sh), and run it:

bash
./fix-dpkg.sh

This script:
1. Lists all installed packages
2. Checks each one for a missing .list file
3. Reinstalls any that are missing their metadata
4. Runs repair commands to clean up

This approach works well on systems where you don't know which specific packages are affected.

7Verify the fix

After running repairs, verify that the issue is resolved:

bash
# Check if the warning is gone
sudo apt-get update

# Verify the .list file now exists
ls -la /var/lib/dpkg/info/package-name.list

# Try package operations
sudo apt-get install -s package-name  # simulate install
sudo apt-get remove -s package-name   # simulate remove

- The first command should complete without warnings about missing .list files
- The ls command should show the .list file exists
- The simulate commands (-s flag) should complete without errors

If the warning persists after these steps, check the package name spelling in the warning message and repeat the reinstall for that specific package.

Advanced notes

### Understanding dpkg Database Structure

The dpkg database lives in /var/lib/dpkg/ and contains:
- status: Package status database (which packages are installed)
- info/: Directory containing metadata for each package
- package-name.list: File list for the package
- package-name.md5sums: Checksums of installed files
- package-name.conffiles: Configuration files
- diversions, statoverride: Special dpkg instructions

### Filesystem Corruption Detection

If you suspect filesystem corruption rather than simple metadata issues:

bash
# Check filesystem for errors
sudo fsck -n /dev/sdX  # Don't actually repair (dry run)

# Check if /var/lib/dpkg is readable
sudo ls -la /var/lib/dpkg/info | head -20

# Verify dpkg database integrity
sudo dpkg --audit

### Preventing This Issue

To avoid missing .list file warnings:
1. Avoid interrupting package installations
2. Don't manually delete files from /var/lib/dpkg/info/
3. Keep filesystem free space available (low disk can cause incomplete writes)
4. Use sudo apt-get update && sudo apt-get upgrade -y for regular maintenance
5. Monitor package integrity periodically: sudo debsums -c

### SELinux and AppArmor on Some Systems

On systems with SELinux or AppArmor enabled, ensure dpkg operations aren't restricted:

bash
# Check AppArmor status
sudo aa-status 2>/dev/null | grep dpkg

# Temporarily disable AppArmor for troubleshooting (requires reboot to enable)
sudo systemctl stop apparmor

### Large-Scale System Recovery

For production systems with extensive dpkg corruption:

1. Boot into single-user mode or recovery mode
2. Mount filesystem with appropriate permissions
3. Restore from /var/backups/ backups
4. Run dpkg --configure -a and apt-get install -f
5. Reboot and verify with apt-get update && apt-get upgrade

### Differences from Related Errors

This warning is distinct from:
- "Unpacking ... would overwrite ..." (file conflict)
- "E: Sub-process /usr/bin/dpkg returned error code" (dpkg crash)
- "dpkg: error processing package" (metadata corruption during operation)

The "missing .list file" specifically indicates incomplete or missing metadata, not active corruption during an operation.

Frequently asked questions

What does "dpkg: warning: files list file for package 'package-name' missing" mean?
The dpkg package manager maintains a database of installed packages in /var/lib/dpkg/. list file that contains the complete list of files that package installed on the system. " This warning indicates: 1.
How do I fix "dpkg: warning: files list file for package 'package-name' missing"?
This warning occurs when dpkg cannot find the .list file for an installed package in /var/lib/dpkg/info/. The issue typically happens after interrupted package installations or corrupted package metadata. Reinstalling the affected package or running package repair commands usually resolves it.
What causes "dpkg: warning: files list file for package 'package-name' missing"?
Package installation was interrupted before the .list file was created (power loss, killed process, disk full) Manual deletion of .list files from /var/lib/dpkg/info/ directory Corrupted or incomplete package download that was force-installed
Is the "dpkg: warning: files list file for package 'package-name' missing" error serious?
It is a medium-severity error โ€” more of a blocker than a risk. The steps above resolve it.

Official resources & further reading