How to fix dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory in APT

APTINTERMEDIATEHIGHUpdated Dec 29, 2025ยท 170 views

The dpkg available file is missing or corrupted, preventing package installations. This file tracks available packages from repositories and can be rebuilt by merging package lists from apt.

Quick fix

Fixes dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory

sudo dpkg --clear-avail
for i in /var/lib/apt/lists/*_Packages; do sudo dpkg --merge-avail "$i"; done
  1. Clear the available file and rebuild it from repository lists
  2. Update your package lists
  3. Verify dpkg can read the available file
  4. Test package operations
apt โ€” error
sudo dpkg --clear-avail
for i in /var/lib/apt/lists/*_Packages; do sudo dpkg --merge-avail "$i"; done
dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory

What this error means

The `/var/lib/dpkg/available` file is dpkg's database of packages available for installation from your configured repositories. When this file is missing or unreadable, dpkg cannot proceed with package operations. This typically occurs after accidental deletion, system corruption, or incomplete package management operations. While dpkg uses this file internally, apt-based systems maintain their own package cache, so the file can be safely reconstructed from repository data.

Typical symptoms

  • dpkg operations fail immediately with "failed to open package info file" error
  • apt-get install, apt-get update, and dpkg commands become unusable
  • Package installation is completely blocked until the file is restored
  • System cannot read or write to /var/lib/dpkg/available

Common causes

  1. The /var/lib/dpkg/available file was accidentally deleted or removed
  2. File system corruption or disk errors damaged the dpkg database files
  3. Interrupted or failed package management operations that corrupted dpkg state
  4. Manual cleanup or system maintenance that removed critical dpkg files
  5. Permission issues preventing dpkg from accessing the file

How to fix "dpkg: error: failed to open package info file '/var/lib/dpkg/available' for reading: No such file or directory"

1Clear the available file and rebuild it from repository lists

Run the following commands to remove the corrupted available file and reconstruct it from your apt repositories:

bash
sudo dpkg --clear-avail
for i in /var/lib/apt/lists/*_Packages; do sudo dpkg --merge-avail "$i"; done

The --clear-avail option erases the existing available file, and --merge-avail rebuilds it by reading the Packages lists from your configured repositories.

2Update your package lists

After rebuilding the available file, refresh your package lists to ensure everything is current:

bash
sudo apt-get update

This synchronizes your local package database with the latest information from your repositories.

3Verify dpkg can read the available file

Confirm the file was successfully created and is readable:

bash
ls -la /var/lib/dpkg/available
file /var/lib/dpkg/available

The file should exist and be readable by the dpkg process.

4Test package operations

Try a simple package query to verify dpkg is working correctly:

bash
sudo apt-cache search bash
sudo apt-get install -s nano

The -s flag simulates an installation without actually installing, letting you verify dpkg functionality.

Advanced notes

If the above steps don't work, your dpkg status database may also be corrupted. Check /var/lib/dpkg/status and verify it's readable with file /var/lib/dpkg/status. If both files are missing, you can restore from backup: sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/status. For systems using dselect (older systems), the available file is more critical, but modern apt-based systems primarily use dpkg's status file. In severe corruption cases, you may need to boot from a live USB and repair the system from there.

Frequently asked questions

What does "dpkg: error: failed to open package info file '/var/lib/dpkg/available" mean?
The /var/lib/dpkg/available file is dpkg's database of packages available for installation from your configured repositories. When this file is missing or unreadable, dpkg cannot proceed with package operations. This typically occurs after accidental deletion, system corruption, or incomplete package management operations.
How do I fix "dpkg: error: failed to open package info file '/var/lib/dpkg/available"?
The dpkg available file is missing or corrupted, preventing package installations. This file tracks available packages from repositories and can be rebuilt by merging package lists from apt.
What causes "dpkg: error: failed to open package info file '/var/lib/dpkg/available"?
The /var/lib/dpkg/available file was accidentally deleted or removed File system corruption or disk errors damaged the dpkg database files Interrupted or failed package management operations that corrupted dpkg state
Is the "dpkg: error: failed to open package info file '/var/lib/dpkg/available" error serious?
Yes. This is a high-severity error that usually blocks work until it is fixed, but the steps above resolve it.

Official resources & further reading