NoPkgs

What is a NoPkg?

A NoPkg is a Munki PkgInfo item that can be deployed with Munki without being associated with a specific PKG or DMG.

A NoPkg typically uses an installcheck_script or an installs array to determine if something is installed. If something is not installed, it will run a postinstall_script. Every time Munki runs, a NoPkg will check for changes in the “installed” state and will run the script if needed.

NoPkgs are great for running scripts and automatically checking for changes in the installed state. They can also provide self-service scripts via the Managed Software Center.

See the official Munki documentation for NoPkgs: https://github.com/munki/munki/wiki/nopkgs

How to create a NoPkg

To use a NoPkg with SimpleMDM, you’ll first need to create one. As noted in the official Munki documentation, there are typically three components to you’ll need to include:

  • installcheck_script: to determine the installation status
  • postinstall_script: the script you want to run
  • uninstall_script: a script to uninstall the original script (optional)

Once each of those components exists, the NoPkg can be created by running the following command on a Mac with Munki tools installed:

makepkginfo --nopkg --name=NAMEOFYOURNOPKG \
  --pkgvers=1.0 --installcheck_script=/PATH/TO/installcheck_script \
  --postinstall_script=/PATH/TO/postinstall_script \
  --uninstall_script=/PATH/TO/uninstall_script \
  --unattended_install > NAMEOFYOURNOPKG.pkginfo

How to deploy a NoPkg in SimpleMDM

After generating your NoPkg, login to SimpleMDM:

  1. Navigate to Apps & Media > Catalog
  2. Select Add Apps > NoPkg App
  3. Upload the NoPkgPkgInfo file
  4. Use Munki-type assignment groups on the Assignments page to assign and deploy your NoPkg

What are some ways to use NoPkgs?

Here are some examples and ideas for how NoPkgs can be used: https://github.com/munki/munki/wiki/nopkgs#what-are-some-examples-of-uses-for-a-nopkg

Still have a question or want to share what you have learned? Visit our Community Discord to get help and collaborate with others.