salt.modules.mac_pkgutil module

Installer support for macOS.

Installer is the native .pkg/.mpkg package manager for macOS.

salt.modules.mac_pkgutil.forget(package_id)

New in version 2016.3.0.

Remove the receipt data about the specified package. Does not remove files.

Warning

DO NOT use this command to fix broken package design

Parameters:package_id (str) -- The name of the package to forget
Returns:True if successful, otherwise False
Return type:bool

CLI Example:

salt '*' pkgutil.forget com.apple.pkg.gcc4.2Leo
salt.modules.mac_pkgutil.install(source, package_id)

Install a .pkg from an URI or an absolute path.

Parameters:
  • source (str) -- The path to a package.
  • package_id (str) -- The package ID
Returns:

True if successful, otherwise False

Return type:

bool

CLI Example:

salt '*' pkgutil.install source=/vagrant/build_essentials.pkg package_id=com.apple.pkg.gcc4.2Leo
salt.modules.mac_pkgutil.is_installed(package_id)

Returns whether a given package id is installed.

Returns:True if installed, otherwise False
Return type:bool

CLI Example:

salt '*' pkgutil.is_installed com.apple.pkg.gcc4.2Leo
salt.modules.mac_pkgutil.list_()

List the installed packages.

Returns:A list of installed packages
Return type:list

CLI Example:

salt '*' pkgutil.list