How to reinstall a package

I am getting this while installing libebml3:

Errors were encountered while processing:
libebml3:i386
Error in function: 
dpkg: error processing libebml3:i386 (--configure):
Package is in a very bad inconsistent state - you should
reinstall it before attempting configuration.

How can I fix this?


Since I happened to have the same problem with another package, wanting a reinstall, and all the methods in the answers either did nothing or first uninstall the whole system before reinstalling, I ended up with a solution.

sudo aptitude reinstall libebml3:i386

Of course, there must be another solution to force a package to reinstall using apt-get instead of aptitude.

sudo apt-get install --reinstall libebml3:i386

dpkg -r libebml3:i386
sudo apt-get update
sudo apt-get install -f
sudo apt-get upgrade

do those steps in terminal .


You could remove the program by entering the following commands in a terminal:

sudo apt-get remove --purge libebml3
sudo apt-get install libebm13
sudo apt-get update
sudo apt-get upgrade

Type following commands in a terminal (Press Ctrl+ALT+t):

sudo dpkg -p libebml3:i386
sudo apt-get update
sudo apt-get install -f