Category filter

How to convert APP to PKG for enterprise app distribution

Hexnode UEM provides an easy method for the distribution of enterprise applications on Mac devices. The apps pushed through Hexnode get silently installed in the device without any user intervention. Applications that run on macOS come in various formats like ‘.app’, ‘.dmg’, and ‘.pkg’. It is recommended to convert APP to PKG format.

One way to distribute apps in ‘.app’ format is by publishing them to the App Store and manually downloading them on all user devices. This process can be made easier by converting it to .pkg format and deploying it over the network or by placing it in a shared folder. For the same reason, Hexnode UEM only supports the distribution of applications that are in the PKG/MPKG/DMG format. Distribution of application in the PKG format helps to reduce steps and save the time taken for installation.

Packages are folders that contain numerous files. However, they appear as a single file to the user. They come as files with a ‘.pkg’ extension. A double click on the PKG file launches the installer GUI. These installers can do things that the drag-and-drop installers (for dmg files) cannot, like installing system services and specifying the install location. The PKG file can be deleted once the installation is complete.

Steps to convert ‘.app’ file to ‘.pkg’ file using Terminal

  1. Open Terminal.
  2. Use the command given below to build a package.

    The productbuild command is used to build product archive for the OS X Installer or the Mac App Store. The three arguments specify the location of the already installed .app file (/component-path/, the path to the location where the component should be installed when the package is installed (install-path) and the desired location of the newly generated .pkg file (/product-output-path/packagename.pkg), respectively.

  3. Wait for the build to complete.

    A similar message is displayed on the Terminal indicating the successful creation of the package file.

  4. Proceed to the destination path to find the package file.
  5. converted to SamplePackage.pkg

For example, the below code builds a package named “packagename.pkg” using the component located at “/Applications/” and installs it to the “/Applications” folder. The output package is saved to “Downloads/packagename.pkg”.

After the build is completed, this message is displayed on Terminal:

Signing a PKG file is essential for security purposes, to ensure that the app is safe and trustable for use and is free from malware. Check out how to sign macOS pkg files for deployment.

And we are done! A package can be distributed via email, FTP, the cloud, thumb drives, and so on. Now you can go ahead and start distributing the packages.


This is only one of the methods that can be used for converting .app to .pkg. Other methods include using tools like Packages, AutoPkg, munkipkg, etc.

  • Deploying and Managing Apps