You may get an error like I did:
pi@raspberrypi:~ $ sudo apt-get install -f xorg-sgml-doctools
Reading package lists... Done
Building dependency tree
Reading state information... Done
xorg-sgml-doctools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/21.9 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
dpkg: error processing package xorg-sgml-doctools (--configure):
package is in a very bad inconsistent state; you should
reinstall it before attempting configuration
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
pi@raspberrypi:~ $ sudo dpkg --configure -a
NOTE: I had this dpkg --configure -a return an error the first time, which it fixed - But the problem above remained..