APT and dpkg status database interoperability during aborted distribution upgrades
During a Debian distribution upgrade, the system relies on the interaction between the APT dependency resolver and the dpkg status database located in /var/lib/dpkg/status . When an upgrade is interrupted mid-process, the system often enters a state where packages are unpacked but not yet configured. While dpkg --configure -a and apt-get install -f are docum