Just read the error. It tells you what you need to do.
subprocess pre-removal script returned error
This means a script is getting in your way, this pre/post install scripts are stored in /var/lib/dpkg/info. You can find the scripts related to a specific package with :
ls /var/lib/dpkg/info | grep "package"
where "package" is the name of the program you want to remove (without brackets).
In your case it is
which is the culprit.
So google how to remove something using apt-get commands and learn how to remove