Unpacking .pkg files in OS X with BetterZip

I had cause today to try to unpack a .pkg file. I had installed PDF File Unlocker and found it was a bit pants1. Unfortunately, it installed from a .pkg file and there was no uninstaller or list of files that get installed, so I wanted to make sure I’d efficiently purged it from my system.

I have BetterZip, which is a really good utility for unzipping basically any file on the planet for OS X. I will just note at this stage that I have an older version of the utility and I haven’t upgraded to BetterZip 2, but I’ve got a lot of use out of the app. The below steps rely on having BetterZip. If you’d like to do it without BetterZip, I found this blog post and this Stack Overflow post to be very helpful in informing my actions.

  1. Change the extension from .pkg to .xar.
  2. Open the file with BetterZip. This took a while on my system but did eventually work.
  3. Three files should appear: Payload, Bom, and PackageInfo.
  4. PackageInfo: Just open this in your favourite text editor.
  5. Payload:
    • Add the extension .cpio.gz.
    • Open the file with BetterZip.
  6. Bom:
    • Open Terminal.
    • Navigate to the file.
    • lsbom Bom

Hopefully that all helps somebody else, too!


  1. If you generate a PDF with the free trial, it’ll be the first half of the PDF and every time you open it Adobe Acrobat will give you a little pop-up window. I disliked it.