Jay Taylor's notes
back to listing indexHow to Inspect an OS X Package File (PKG) Without Installing – The Mac Observer
[web search]Inspecting Installer Packages
One might think, at first, that the OS X command "Show Package Contents" will work on another package file, an installer that ends in .pkg or .mpkg. That may or may not work depending on how the package file is constructed.
Note that .mpkg files are meta-packages that may contain .pkg files inside them that may be amendable to Show Package Contents.
However, if Show Package Contents isn't provided as a contextual menu option for either type of installer, don't despair. A different kind of tool is needed to analyze it. In this case, one can use a nifty OS X command line tool called pkgutil. It extracts the contents of the package file into its component pieces and can write it all out to a folder for inspection.
The easiest way to get started is to do a simple expand option and write it out to a named folder. The "man" page, of course, shows all the options. In the simplest case, the terminal commands would be:
pkgutil --expand package-name.pkg destination-folder
pkgutil --expand package-name.mpkg destination-folder
In these examples, the destination folder will be in the same folder as the package file, but one could define a path to somewhere else.
Here's what a dump looks like for one of my .mpkg files.