Can't install stuff on APT

So df -h indicates that you have enough free space.

To fix the issue we can remove problematic packages using low-level commands:

sudo dpkg --force-all --purge  linux-headers-5.11.0-22
sudo dpkg --force-all --purge  linux-headers-5.11.0-22-generic
sudo dpkg --force-all --purge linux-headers-generic

and then reinstall the headers package by

sudo apt-get install linux-headers-generic

and install upgrades then by

sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade # to get new dependencies
1 Like