How Did I Fix That?

A log of solutions to problems I've encountered. No warranties.

What's inside a mystery software package file?

27 March 2019

A package (.pkg file in OS X) is an .xar archive containing a cpio.gz archive of installable files in "Payload", along with a "bill of materials", scripts, etc. To inspect the contents, unpack the .xar into a directory, and then open the Payload file:

mkdir scratch; cd scratch
xar -xf ../mystery.pkg
gunzip -dc Payload | cpio -i

The file hierarchy shows where the contents of the package would be distributed during installation.

Tags: MacOS, software