Deploy packages using Munki

Applies to enterprise & teams.

Munki is a collection of open-source tools which manage software installation and configuration when used together with a web server-based repository of packages and package metadata. It is typically used by system administrators who need to manage software installations on large numbers of macOS computers, typically in enterprise and education environments.

This article guides you through the steps to install and uninstall packages using Munki.

Install package

1. Create package on Admin Console

Sign into the Admin Console, go to the Packages tab, and click Create package.

After you create the package on the Adobe Admin Console, the package is downloaded to your computer.

2. Import package into Munki repo

  1. In the terminal, run the following command:

    munkiimport <path of downloaded package>

  2. You are prompted for information about the package.

    Use existing item as a template? [y/N]

    If you have previously imported an Admin Console package, and you want to use the existing template:

    1. Enter Y and hit Return

    If this is the first package you're importing or to use a new template:

    1. Enter N and hit Return.
    2. Hit Return to use the default item name.
    3. Enter a Dispaly name and Description.
    4. Hit Return to use the version and the catalogs.
    5. Enter the category and developer and hit Return.
  3. You are prompted to edit the newly created pkginfo file.

    Hit Y to review or edit the file.

    Hit N to proceed without making changes to the file.

  4. Rebuild catalogs to complete import functionality.

3. Create client manifest

We now have our package in the Munki repo.

Next you need to create a client manifest so that Munki knows what to install on a given machine.

Use the manifestutil tool to create manifest.

Run the following commands to create new manifiest and add the package to it:

  • manifestutil --new-manifest site_default
  • manifestutil --add-catalog <Catalog name> --manifest site_default
  • manifestutil --add-pkg <Package name> --manifest site_default

4. Run Install package on client machine

The package is now ready to be installed on client machines.

If you have specified unattended_install as True, then the package gets installed automatically when the munki agent runs next on client machine.

If you have specified unattended_install as False or if need to trigger a manual install, execute the following command on the client machine:

sudo /usr/local/munki/managedsoftwareupdate --installonly

Or launch managed software center tools and trigger the installation.

Uninstall package

1. Download package from Admin Console

Sign into the Admin Console, go to the Packages tab, and download the package that you used to install on the client machines.

Use the _Uninstall.pkg file for uninstall process.

2. Import package into Munki repo

  1. In the terminal, run the following command:

    munkiimport <path of downloaded package>

  2. You are prompted for information about the package.

    Use existing item as a template? [y/N]

    If you have previously imported an Admin Console package, and you want to use the existing template:

    1. Enter Y and hit Return

    If this is the first package you're importing or to use a new template:

    1. Enter N and hit Return.
    2. Hit Return to use the default item name.
    3. Enter a Dispaly name and Description.
    4. Hit Return to use the version and the catalogs.
    5. Enter the category and developer and hit Return.
  3. Rebuild catalogs to complete import functionality.

3. Create client manifest

We now have our package in the Munki repo.

Next you need to create a client manifest so that Munki knows what to install on a given machine.

Use the manifestutil tool to create manifest.

Run the following commands to create new manifiest and add the package to it:

  • manifestutil --new-manifest site_default
  • manifestutil --add-catalog testing --manifest site_default
  • manifestutil --add-pkg <PackageName> --manifest site_default

4. Run UniInstall package on client machine

The package is now ready to be uninstalled on client machines.

If you have specified unattended_install as True, then the package gets installed automatically when the munki agent runs next on client machine.

If you have specified unattended_install as False or if need to trigger a manual install, execute the following command on the client machine:

sudo /usr/local/munki/managedsoftwareupdate --installonly

Or launch managed software center tools and trigger the installation.

Get help faster and easier

New user?