Skip to content

How apps are found

App Auto-Patch doesn’t keep its own list of apps. Every discovery starts from the Installomator labels and looks on the Mac for the app each label installs. This page says where it looks, when it looks, and what to check when it finds an app you thought was uninstalled.

For each label in Installomator’s fragments/labels folder:

  1. Labels are left out first. IgnoredLabels, NonProductionLabelSuffixes and IgnoreVendorManagedApps drop labels before anything is looked for. RequiredLabels and OptionalLabels keep a label in even when an IgnoredLabels pattern matches it.
  2. The app’s file name comes from the label’s appName, or its name plus .app. A label that sets name or appName to more than one value, such as one per architecture or an older name, is looked for under each of them.
  3. The standard folders, in the order Installomator checks them:
    • the label’s targetDir, when it sets one
    • /Applications
    • /Applications/Utilities
    • ~/Applications
  4. The app the label checks. Some labels read the version of a different app from the one they name, in their appCustomVersion() function. That app counts too. A path with a version folder in it, such as Python’s Versions/3.12, matches any installed version, and only a copy signed by the label’s Team ID counts.
  5. Names only known when the label runs, such as IGV_*.app, are matched in the standard folders. Only copies signed by the label’s Team ID count, and the newest one wins.
  6. Spotlight, last. When the app isn’t in any of those places, App Auto-Patch looks for its file name in Spotlight’s list of application bundles (one mdfind per discovery), as Installomator does. This finds a copy anywhere Spotlight indexes: another folder, another user’s home folder, a mounted disk image or another volume.
    • A copy in a Downloads, Desktop or Trash folder, or in a temporary folder, is skipped.
    • A Spotlight result whose file no longer exists is skipped, so an out-of-date Spotlight index doesn’t bring back a deleted app.
    • With several copies, the newest one signed by the label’s Team ID wins.
    • DiscoverySpotlightFallback set to false turns this step off.
  7. Package receipts. A label with a packageID takes the installed version from the package receipt, as Installomator does, once its app is found. With DiscoverPackageReceiptOnlyLabels on, a label whose package installs no app (a JDK, a driver, a command-line tool) is found from its receipt alone, as long as at least one file the receipt lists is still on disk. One-time Microsoft reset and removal packages, and a receipt more than one label uses, never count this way.

Every copy found is then checked against the path filters. A copy is left out when:

  • its path contains one of the folders that are always ignored: /Daemon Containers/, /Library/Application Support/JAMF/Composer/, /Applications/Chrome Apps.localized/, /Applications/Edge Apps.localized/, /Applications (Parallels)/ and /Applications (Virtual Machines)/
  • its path contains an IgnoreFilePaths entry (case-insensitive)
  • it isn’t on the startup volume and IgnoreExternalDrives is on (external disks, disk images, network volumes)
  • it’s under /Users/ and IgnoreAppsInHomeFolder is on

What App Auto-Patch does with a copy it found:

  • Signed by someone else. When the app’s Team ID differs from the label’s expectedTeamID, the dashboard shows Signature mismatch—won’t update, and App Auto-Patch doesn’t update it.
  • From the Mac App Store. The dashboard shows Updated by the App Store, and App Auto-Patch leaves it alone unless InstallomatorOptions sets IGNORE_APP_STORE_APPS=yes.
  • Found by two labels. The first label in alphabetical order keeps the app, unless PreferPkgLabels picks the pkg label or one of them is in RequiredLabels.

The installed version is the label’s versionKey, when it sets one, else the app’s CFBundleShortVersionString, else its CFBundleVersion. A label with a packageID uses the receipt’s version instead, and a label with appCustomVersion() uses what that returns. The latest version comes from the label, without downloading anything. When the label doesn’t give one, VersionComparisonInstallomatorFallback has Installomator download the installer and read its version, and that result is kept for UnknownVersionCheckIntervalDays.

  • At first-run setup, and when Discover Applications is clicked on the dashboard.
  • On Check for Updates. When the apps in /Applications, /Applications/Utilities or ~/Applications changed since the last discovery, or the settings that leave apps out changed, it runs a full discovery first. Otherwise it checks only the labels already in its list, and an app that’s no longer found drops off.
  • In the root helper, on the DiscoveryFrequency schedule and during background patching of closed apps. With WatchApplicationsFolder on, it also checks about a minute after a new app appears in /Applications or /Applications/Utilities.

The dashboard, the menu bar and the companion scripts show the result of the most recent check. An app removed since then stays listed until the next check. A check of some apps only, such as the one after an update or a Re-check, updates only their rows. The list from the root helper’s scheduled discovery replaces every row the app hasn’t checked since that pass, unless the app has checked every app since then (from build 135).

First find out where App Auto-Patch found it, then look it up in the table below.

  • The log. Turn on Settings › Advanced › Debug › Verbose Mode (or VerboseMode in your profile), click Discover Applications, then open Logs in the sidebar, or /Library/Application Support/AppAutoPatch/logs/aap.log. Search for the app’s file name, such as Google Chrome.app. Each copy found is logged as one of these:

    • Resolved Google Chrome.app at <path>
    • Resolved Google Chrome.app via appCustomVersion at <path>
    • Resolved Google Chrome.app via Spotlight at <path>
    • Resolved <pattern> for <label> at <path>, for a version folder or a name only known when the label runs
    • Spotlight found 2 copies of Google Chrome.app for googlechrome. Using the newest … (the other copies are listed after Others:)
    • <label> has no app, but its pkg receipt <packageID> and files are installed. Discovered from the receipt (DiscoverPackageReceiptOnlyLabels).

    The last two are written without Verbose Mode too. Turn Verbose Mode off again afterwards.

  • A diagnostic bundle. Settings › About › Generate Diagnostic Bundle writes a .zip to the Desktop. Its discovered-apps.json (the app’s list) and helper-discovered-apps.json (the root helper’s list) give each app’s label and appPath. An app found from its receipt alone has no appPath.

  • Terminal. To see the copies Spotlight knows about:

    Terminal window
    mdfind "kMDItemFSName == 'Google Chrome.app' && kMDItemContentType == 'com.apple.application-bundle'"

    For a label with a packageID, pkgutil --pkg-info <packageID> shows whether its receipt is still there, and pkgutil --files <packageID> lists the files it installed.

What you find Why it’s found What to do
A path outside /Applications, such as /Users/Shared, another user’s ~/Applications, an old-versions folder, or a vendor folder under /Library/Application Support A second copy was left behind. Spotlight finds it. Delete that copy, or leave the folder out with IgnoreFilePaths (part of the path is enough), or IgnoreAppsInHomeFolder for anything under /Users/.
A path under /Volumes/ A mounted disk image, such as the installer’s own, or another drive. Eject it, or set IgnoreExternalDrives.
A different app from the one you removed, such as a helper app or another version’s folder The label checks that app in its appCustomVersion(), or another version of the app is still installed. Remove the rest of the app with the vendor’s uninstaller.
No path; the log says Discovered from the receipt DiscoverPackageReceiptOnlyLabels is on, the package’s receipt is still there, and at least one of its files is still on disk. Remove the package’s remaining files (pkgutil --files <packageID> lists them). Once none are left, it isn’t found. sudo pkgutil --forget <packageID> removes the receipt itself.
The row says Not installed (required) The label is named in RequiredLabels, so App Auto-Patch installs it whenever it’s missing. Remove the label from RequiredLabels. A wildcard entry such as microsoft* never installs a missing app.
The app is back at its usual path Something put it back: your MDM, a user, or another tool. App Auto-Patch only updates apps that are installed, except required ones. Check your MDM’s policies and the app’s date added in Finder.
No copy anywhere The list is from an earlier check. Click Check for Updates or Discover Applications, and the app drops off the list. The companion scripts follow once that check is done.

To stop App Auto-Patch managing an app on every Mac, whether or not a copy is left behind, add its label to IgnoredLabels.