Mac OS X : Uninstall applications installed from packages

If you’ve installed an application from a .pkg-type installer, Mac OS X keeps a listing of what was installed in the Library/Receipts folder — either the top-level Library, or your user’s Library. The lsbom command can be used to see this list, and to uninstall the application.
First, find the receipt. It will be in either ~/Library/Receipts or /Library/Receipts, as the name of the package. The actual bom (“bill of materials”) file is located at, for example,
/Library/Receipts/some_app.pkg/Contents/Archive.bom
Use the lsbom command to see what was installed: lsbom -fls /Library/Receipts/some_app.pkg/Contents/Archive.bom You can use this list to manually delete the items installed, or you can feed the list to rm to delete the installed files. Be sure to examine the list of files before trying to remove them — this command will only work if the paths are relative to the root directory (“/”), and I haven’t tried it with names with spaces.
lsbom -fls /Library/Receipts/some_app.pkg/Contents/Archive.bom | (cd /; sudo xargs rm)
This will remove any installed files, though directories must be removed manually

Leave a comment

Your email address will not be published.