How to fix dpkg: package is in a very bad inconsistent state - you should reinstall it before attempting configuration in APT | DevErrors