How to fix E: flAbsPath on /var/lib/dpkg/status failed - realpath in APT
The apt package manager cannot access the dpkg status file, which tracks installed packages. This occurs when the status file is missing or corrupted, preventing apt from reading package information or installing updates.
Quick fix
Fixes E: flAbsPath on /var/lib/dpkg/status failed - realpath
ls -la /var/lib/dpkg/status*- Check if status-old backup exists
- Restore from status-old
- Restore from system backup if status-old is unavailable
- Clear apt cache and update
ls -la /var/lib/dpkg/status*E: flAbsPath on /var/lib/dpkg/status failed - realpath
What this error means
The "flAbsPath" error is thrown by apt when it attempts to resolve the absolute path to the dpkg status file and fails. The dpkg status file is a critical database that records all installed packages, their versions, and dependencies on your Debian/Ubuntu system. When this file is missing, corrupted, or inaccessible, apt cannot function because it cannot determine what packages are installed or their states. The "realpath" function tries to resolve symbolic links and normalize the path, but if the underlying file does not exist or is unreadable, this operation fails immediately, blocking all apt operations.
Typical symptoms
- apt update, apt install, or apt upgrade commands fail immediately
- Error message mentions "flAbsPath on /var/lib/dpkg/status failed"
- Cannot install, upgrade, or remove any packages
- Other error messages may follow about "Could not open file" or "package lists could not be parsed"
- System shows broken dependencies or held packages
Common causes
- The /var/lib/dpkg/status file was deleted or removed accidentally
- The file was corrupted due to a system crash, power loss, or interrupted apt operation
- Filesystem errors or corruption on the disk partition containing /var/lib/dpkg
- During Ubuntu installation with ZFS encryption, /var/lib/dpkg directory was not properly mounted
- Third-party tools or scripts incorrectly modified or deleted the dpkg directory
- Hardware failure causing data loss in the /var partition
How to fix "E: flAbsPath on /var/lib/dpkg/status failed - realpath"
Open a terminal and list the contents of the dpkg directory to see if a backup exists:
ls -la /var/lib/dpkg/status*If you see a file named status-old, you can restore from this backup. This file is typically updated by apt and contains the previous state of installed packages.
If the status-old file exists, restore it to status:
sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/statusThen verify the file was restored:
ls -la /var/lib/dpkg/statusThe file should be several kilobytes in size. If successful, apt should work again.
If status-old does not exist, check for system backups in /var/backups:
ls -la /var/backups/ | grep dpkgYou may see files like dpkg.status.0 or dpkg.status.0.gz. Restore from the most recent backup:
sudo cp /var/backups/dpkg.status.0 /var/lib/dpkg/statusIf the file is compressed (.gz), decompress it first:
sudo zcat /var/backups/dpkg.status.0.gz > /tmp/status
sudo mv /tmp/status /var/lib/dpkg/status
sudo chown root:root /var/lib/dpkg/status
sudo chmod 644 /var/lib/dpkg/statusAfter restoring the status file, refresh the apt package lists and cache:
sudo rm -rf /var/lib/apt/lists/*
sudo apt updateThe apt update command rebuilds the cache from configured repositories. This may take a minute or two depending on your internet connection.
Test that apt now functions correctly:
sudo apt upgradeIf there are no errors, apt has recovered. Your system can now manage packages normally.
Advanced notes
If both the status file and status-old backup are missing or corrupted, you face a more difficult situation. Some users have attempted to create an empty status file using sudo touch /var/lib/dpkg/status followed by sudo apt update, but this loses package history and can cause issues when trying to uninstall packages. If backups in /var/backups are also unavailable or corrupted, you may need to perform a fresh installation of your operating system. On encrypted filesystems or systems with mounting issues (such as Ubuntu with ZFS + encryption), ensure that /var/lib/dpkg is properly mounted before attempting these fixes. In rare cases where filesystem corruption is the root cause, running sudo fsck or checking disk health with SMART tools may be necessary.
Frequently asked questions
- What does "E: flAbsPath on /var/lib/dpkg/status failed - realpath" mean?
- The "flAbsPath" error is thrown by apt when it attempts to resolve the absolute path to the dpkg status file and fails. The dpkg status file is a critical database that records all installed packages, their versions, and dependencies on your Debian/Ubuntu system. When this file is missing, corrupted, or inaccessible, apt cannot function because it cannot determine what packages are installed or their states.
- How do I fix "E: flAbsPath on /var/lib/dpkg/status failed - realpath"?
- The apt package manager cannot access the dpkg status file, which tracks installed packages. This occurs when the status file is missing or corrupted, preventing apt from reading package information or installing updates.
- What causes "E: flAbsPath on /var/lib/dpkg/status failed - realpath"?
- The /var/lib/dpkg/status file was deleted or removed accidentally The file was corrupted due to a system crash, power loss, or interrupted apt operation Filesystem errors or corruption on the disk partition containing /var/lib/dpkg
- Is the "E: flAbsPath on /var/lib/dpkg/status failed - realpath" 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
- ๐APT Official Documentation
- ๐Debian Bug #833606(Official Docs)
- ๐ฌProxmox Forum - dpkg recovery(Stack Overflow)
- ๐ฌUbuntu Forums - apt/dpkg status errors(Stack Overflow)