Sunday, December 14, 2008

How to find out which files were installed with a Mac package

Installing a Mac package is usually a process of dragging an icon from an installer to the Applications folder. This creates a new directory in the Applications folder with the application files inside it. Sometimes, additional files are installed in other places. To see everything that was installed, use the /Library/Receipts directory and the lsbom utility.

An applications that follows Mac standards will leave a record of what was installed in the /Library/Receipts/app-name directory.

Within that directory, there should be a Contents subdirectory, and inside that, an Archive.bom file. The .bom file is a "bill of materials" with a list of all the files that belong to that application, the full path to their location, and other details like the UNIX permissions, file size, and checksum.

However, the bill of materials is a binary file. To extract information from it, use the list bill of materials command line utility, lsbom.

To list all files and related information in a BOM file:

lsbom BOMfile

To list only the files without related information in a BOM file:

lsbom -s BOMfile