Unable to uninstall XPI packages in Mozilla

I’ve received a few hits from people searching for “xpi uninstall” or “mozilla xpi uninstall” from Google. As it turns out, my weblog is #1 for those keywords, even outranking the Mozilla troubleshooting FAQ. As a follow-up to this post, I will tell you that there is no way to uninstall XPI packages. This is a known bug in Mozilla 1.0 and has been for quite some time. You are probably out of luck and might have to uninstall and then reinstall Mozilla. There might be a way to manually remove the package from Mozilla’s registry and RDF files, but it’s not obvious. If you find a way, please publish a link to the instructions.

So how does Optimoz perform the uninstall? Looking at the Optimoz preferences code it appears as though the developers have taken the code used to uninstall themes and hacked it to uninstall their XPI package. Look for the mozgestUninstall() function in that source file to get a better idea of what is going on. It appears that Optimoz is installed in the Chrome registry. On uninstall, the package is removed from the registry and all references to Optimoz are removed from Mozilla’s RDF files.

That Mozilla does not even provide its developers with a proper method of uninstalling installed XPI applications is horribly poor planning. A sure sign of things gone awry is when third-party developers have to produce hacks to obtain basic functionality which should have been supplied automatically. Unfortunately, this happens all too often in the world of development. Before I die, I hope everyone can finally get it right.

Leave a Reply