How to Use the macOS pkgutil Command to Inspect Installed Software Packages

When you install software on a Mac by double-clicking a .pkg file, the macOS Installer app takes over, extracting files and placing them across various system directories. Unlike drag-and-drop .app bundles that exist entirely in the Applications folder, package installations leave a complex trail. If you need to troubleshoot a broken installation, figure out exactly where a driver was placed, or cleanly uninstall a stubborn piece of software, you need to use the Terminal command pkgutil.

The pkgutil command interacts directly with the receipt database, which macOS uses to track every package ever installed on the system.

Step 1: Find the Package Identifier

macOS tracks installations using a reverse-domain naming convention known as a Package Identifier (e.g., com.microsoft.office or com.adobe.acrobat). Before you can inspect a package, you must find its identifier.

Open Terminal and run:

pkgutil --packages

This will print a massive list of every package installed on your Mac. To find what you are looking for, pipe the output into the grep command. For example, to find all packages related to Microsoft:

pkgutil --packages | grep -i microsoft

Locate the specific identifier for the software you are investigating.

Step 2: Inspect Package Metadata

Once you have the identifier (let’s use com.zoom.macos.Zoom as an example), you can ask the receipt database for details about the installation.

pkgutil --pkg-info com.zoom.macos.Zoom

The output will display crucial information, including:

  • version: The exact version number of the installed software.
  • install-time: A Unix timestamp of when it was installed. (You can convert this to human-readable time using date -r [timestamp]).
  • volume: The hard drive it was installed on (usually /).
  • location: The base directory where the files were unpacked.

Step 3: List Every File Installed by the Package

This is the most powerful feature of pkgutil. If you are trying to manually uninstall an application that doesn’t provide an uninstaller, dragging the app from the Applications folder to the Trash is not enough. You must find all the hidden helper tools, LaunchDaemons, and preference panes.

Run the following command to see every single file and folder placed on your hard drive by the installer:

pkgutil --files com.zoom.macos.Zoom

This list is often very long. The file paths are relative to the “location” specified in the --pkg-info output. You can use this list to manually navigate to those directories and delete the orphaned files, ensuring a completely clean removal.

Step 4: Verify the Integrity of Installed Files

If an application is crashing and you suspect a file was corrupted or accidentally deleted, you can ask pkgutil to check the current state of the files against the original installation receipt.

pkgutil --verify com.zoom.macos.Zoom

The system will scan the files. If it finds a file that has been modified, or if a required file is missing, it will list the specific discrepancies in the Terminal output, alerting you that the software needs to be reinstalled.

Step 5: Forgetting a Package (Advanced)

If you have manually deleted all the files associated with a package, macOS will still think the software is installed because the receipt is still in the database. This can cause problems if you try to install an older version of the software later.

You can force macOS to delete the receipt from the database using the --forget command. Warning: This does not delete the actual application files; it only deletes the record of the installation.

sudo pkgutil --forget com.zoom.macos.Zoom

You will need to enter your administrator password to modify the receipt database.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.