check_latest_version && sudo apt update && sudo apt upgrade -y
Complete interrupted package configuration:
sudo dpkg --configure -a
sudo apt-get install -f
sudo apt --fix-broken install
Remove corrupted package files:
sudo apt clean
sudo apt autoclean
sudo rm -rf /var/lib/dpkg/updates/*
Repair package database if corrupted:
sudo mv /var/lib/dpkg/info /var/lib/dpkg/info.bak
sudo mkdir /var/lib/dpkg/info
sudo apt-get update
The dpkg package manager was interrupted during installation, leaving the system in an inconsistent state.
dpkg -l | grep "^iU"
cat /var/lib/dpkg/status | grep Status
ls -la /var/lib/dpkg/
df -h /var