Removing Badly Broken Package
Run the following to find all the files that were installed:
dpkg --listfiles
Then delete each one
Edit the file /var/lib/dpkg/status
Remove the section for your badly broken package (Make a backup before you edit the file!)
Edit the file /var/lib/dpkg/available
Remove the section for your badly broken package (Make a backup before you edit the file!)