I used sudo dpkg --configure -a
to repair an incomplete update. It solved at least most of the problems, but says
dpkg: error processing package linux-libc-dev:amd64 (--configure): package is in a very bad inconsistent state; you should reinstall it brefore attemping to configure it.
I entered sudo apt-get remove linux-libc-dev:amd64
and it removed some parts of the package and said:
dpkg: error processing package linux-libc-dev:amd64 (--remove): package is in a very bad inconsistent state; you should reinstall it brefore attemping a removal
How can I reinstall it?