How to Extract Packages (PKG) files on a Mac OS

Software for Apple’s OS X platform comes in package files, and these packages make installing software extremely simple. This was one of the advances that came with the Unix-core OS X is based on. Users should always check to make sure that they know what’s in a package they’ve downloaded before installing it. Generally this can be done with the Mac Finder.

Mac Finder isn’t always capable of reading the contents of a package file, which requires users to rely instead on the command line to view what’s inside. Additionally packages can sometimes become corrupt or you might need to extract a single file from a package for some other reason. The same command can be used to accomplish this.

Viewing Package Contents

Open the Mac Finder from the dock, navigate to /Applications/Utilities/ and then launch the Terminal.


Use the following command pointed at the package you want to view the contents of:

pkgutil –expand thePackage.pkg /destination

cd /destination


Replace thePackage.pkg with the package name and /destination with where you put it. For instance, if you wanted to work on the Desktop with a package called volume.pkg:

pkgutil –expand volume.pkg ~/Desktop

cd ~/Desktop



These files can now be examined, manipulated or thrown in the Trash once you’re done with them. If you wanted to keep only .gif files from a package, for example, you could make a directory then move them to it before deleting all of the others:

mkdir Images

mv *.gif ./Images

Kevin Arrows
Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Expert Tip

How to Extract Packages (PKG) files on a Mac OS

If the issue is with your Computer or a Laptop you should try using Restoro which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption. You can download Restoro by clicking the Download button below.

Download Now

I'm not interested