David Reynolds

Welcome to boredom

Uninstalling or Removing a .pkg File

| Comments

It took me a bit of digging around to find this, so I thought I’d record it here in the hope that it might help someone in the future.

If you’ve just installed something on your OS X system (I’ve done this on Tiger, can’t vouch for it working on anything other than that) and you want to remove it, what can you do? The installer with the package doesn’t have an uninstaller and you can’t find a list of files anywhere to remove, so what can you do? Well, this:

$ lsbom package.pkg/Contents/Archive.bom

This will return you a list of files which you can then go through and remove, I’ve yet to come up with a script to do it as the list of files contains top level folders as well as files and I couldn’t work out a quick way to differentiate between them.