Quantcast
Channel: How To's | Everything Tech - Appuals.com
Viewing all articles
Browse latest Browse all 4542

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

$
0
0

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.

2016-09-24_162650

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

pkgutil –expand thePackage.pkg /destination

cd /destination

ls

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

ls

pkg-mac

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

The post How to Extract Packages (PKG) files on a Mac OS appeared first on Appuals.com.


Viewing all articles
Browse latest Browse all 4542

Trending Articles