Ever wonder exactly what gets installed when you run one of Apple's Software Updates?

Mar 28, 2006 06:29 GMT  ·  By

Ever wonder exactly what gets installed when you run one of Apple's Software Updates? By using Terminal, you can usually find out exactly what an installer added to your system. This can be useful if you have trouble with an update, or if you'd like to remove a program that doesn't include an uninstaller.

OS X keeps track of installation details in the /Library/Receipts folder.

Open Terminal (/Applications/Utilities) and type the command ls -al /Library/Receipts to see this folder's contents. A long list of receipt files (one for every program you've installed on your Mac) will greet you. These files are actually folders; within each one is a document that lists every file changed by that program's installer.

Take, for example, the listing Safari.pkg. To see what files Safari's installer changes, type these commands into Terminal (ignoring the $, which stands for the Terminal prompt):

$ cd /Library/Receipts $ cd Safari.pkg/Contents $ ls -al

These commands switch into the Receipts directory, navigate into the Contents folder within the Safari package, and then list the files within that folder. You're interested in the file Archive.bom (bom stands for "bill of materials"). It contains an inventory of every file the installer touched. Using the Unix command lsbom (which lists the contents of a .bom file), you can get a list of the changed files by typing lsbom Archive.bom -pf | more.

The -pf bit tells lsbom to show only file names; otherwise, you get a lot of excess information. Type this command and press return to see output fill your Terminal window. The list of files is huge-more than 2,900 entries. To stop the output, just press Q while it's paused at the bottom of a screen. You may find the lsbom command most useful when you're investigating the impact of small programs that use Apple's installer.

As with Safari, you'll find most .bom files in the Contents folder within the application's package. Most will also be named Archive.bom. But there are exceptions: for instance, DVD Player Update's .bom file is called DVDPlayerUpdate.bom and lives in the update's /Contents/Resources folder. If you can't find the .bom file you're looking for, change directories (using the cd command) into the application's package, and then type this command:

find . -name "*.bom"

This will locate any .bom files at or below the currently active directory and display the path and file name for any matches it finds.