pkgutil -- Query and manipulate Mac OS X Installer packages and receipts.

pkgutil [options] [commands]

Reads and manipulates Mac OS X Installer flat packages, and provides access to the receipt database used by the Installer.

Options are processed first, and affect the operation of all commands.
Multiple commands are performed sequentially in the given order.

The files and directories where receipts are stored are subject to change. Always use pkgutil to query or modify them.

--force
-f
Don't ask for confirmation before performing a potentially destructive or ambiguous operation.
--verbose
-v
Output in a "human-readable" format with extra headers, footers, indentation, and other contextual information.
--volume path Perform all operations on the specified volume or home directory.
default: The root volume /
--edit-pkg package-id Specifies an existing receipt to be modified in-place by --learn.
--only-files List only files (not directories) in --files listing.
--only-dirs List only directories (not files) in --files listing.
--regexp Try to match package-id arguments as a regular expression if an exact match isn't found.
See egrep(1) and re_format(7) for syntax.
RECEIPT DATABASE COMMANDS
--packages
--pkgs
List all installed package IDs on the specified --volume.
--pkgs-plist List all installed package IDs on the specified --volume in Mac OS X plist(5) format.
--pkgs=REGEXP List all installed package IDs matching REGEXP on the specified --volume.
The equal sign (=) is required or the search string will be ignored and all package IDs will be returned.
Be mindful of escaping characters in both your shell and the regular expression. (Eg, 'pkgutil --pkgs=\\.D' searches for package IDs matching the literal '.D' after escaping the backslash from your shell and then the dot from the regex to make it literal.) Regular expressions are more complex than simple shell globbing. A dot (.) matches any character, while '*' matches zero or more of the previous character.
See re_format(7) for a complete description of the syntax.
--files package-id List all of the files installed under the package-id.
--export-plist package-id output all receipt information about the specified package-id in the standard Mac OS X plist(5) format.
--verify package-id Run repair_packages(8) to verify the specified package-id.
--repair package-id Run repair_packages(8)
--pkg-info package-id output extended information about the specified package-id.
--pkg-info-plist package-id output extended information about the specified package-id in Mac OS X plist(5) format.
--forget package-id Discard all receipt data about package-id, but do not touch the installed files.
DO NOT use this command from an installer package script to fix broken package design.
--learn path Update the ACLs of the given path in the receipt identified by --edit-pkg. This affects subsequent repair operations on the package.
cannot be used from package postinstall scripts, but if a postinstall script changes the ACLs on the installed files, the receipt is automatically be updated to reflect those changes.
will not update the filesystem permissions in the receipt.
--pkg-groups package-id List all of the package groups this package-id is a member of.
--groups List all of the package groups on the specified --volume.
--groups-plist List all of the package groups on the specified --volume in Mac OS X plist(5) format.
--group-pkgs group-id List all of the packages that are members of this group-id.
--file-info path Show the metadata known about path.
--file-info-plist path Show the metadata known about path in Mac OS X plist(5) format.
FILE COMMANDS

--expand pkg-path dir-path
--flatten dir-path pkg-path Flatten the dir-path into a new flat package created at pkg-path. The directory to be flattened must have the proper contents and layout for a flat package. This is not intended as a substitute for pkgbuild(1).
--bom path Extract any BOM files from the flat pkg at path into /tmp and return the filename(s).
Suggested use is as an argument to lsbom(8). Eg, "lsbom `pkgutil --bom path`". Note that some flat package archives may contain no BOM, one BOM, or several BOMs.
--payload-files path List the files archived within the payload of the uninstalled flat package(s) contained at path.
This should be equivilant to lsbom -s `pkgutil --bom path`
flat package archives may contain more than one package, and the destination location for the uninstalled package(s) is unknown to this command.
--check-signature pkg-path Check the validity and trust of the signature on the package at pkg-path. In addition to the status of the signature, the associated certificate chain will be shown.
--help, -h

see also

installer(8) repair_packages(8) pkgbuild(1) productbuild(1)
pkgutil [OPTIONS] [COMMANDS] ...

Options:
  --help                 Show this usage guide
  --verbose, -v          Show contextual information and format for easy reading
  --force, -f            Perform all operations without asking for confirmation
  --volume PATH          Perform all operations on the specified volume
  --edit-pkg PKGID       Adjust properties of package PKGID using --learn PATH
  --only-files           List only files (not directories) in --files listing
  --only-dirs            List only directories (not files) in --files listing
  --regexp               Try all PKGID arguments as regular expressions

Receipt Database Commands:
  --pkgs, --packages     List all currently installed package IDs on --volume
  --pkgs-plist           List all package IDs on --volume in plist format
  --pkgs=REGEXP          List package IDs on --volume that match REGEXP
  --groups               List all GROUPIDs on --volume
  --groups-plist         List all GROUPIDs on --volume in plist format
  --group-pkgs GROUPID   List all PKGIDs in GROUPID
  --files PKGID          List files installed by the specified package
  --lsbom PKGID          List files in the same format as 'lsbom -s'
  --pkg-groups PKGID     List all GROUPIDs that PKGID is a member of
  --export-plist PKGID   Print all info about PKGID in plist format
  --verify PKGID         Verify file permissions of the specified package
  --repair PKGID         Repair file permissions of the specified package
  --pkg-info PKGID       Show metadata about PKGID
  --pkg-info-plist PKGID Show metadata about PKGID in plist format
  --file-info PATH       Show metadata known about PATH
  --file-info-plist PATH Show metadata known about PATH in plist format
  --forget PKGID         Discard receipt data for the specified package
  --learn PATH           Update --edit-pkg PKGID with actual metadata from PATH

File Commands:
  --expand PKG DIR       Expand the flat package PKG to DIR
  --flatten DIR PKG      Flatten the files at DIR as PKG
  --bom PATH             Extract any Bom files from the pkg at PATH into /tmp
  --payload-files PATH   List the paths archived within the (m)pkg at PATH