Jamf Blog
September 26, 2019 by Shane Brown

How to find remaining 32-bit applications on macOS

With macOS Catalina, Apple no longer supports 32-bit applications. See how you can locate all 32-bit macOS applications and take action.

Why do you want to identify Mac computers running 32-bit applications?

With macOS Catalina, Apple no longer supports 32-bit applications. Apple has been transitioning toward only supporting 64-bit applications for quite some time.

You may have noticed an alert on your Mac that looks like this:

Since macOS High Sierra 10.13.4, Apple has produced a one-time alert when a 32-bit application is launched. So, as we inch closer to Apple’s release of macOS Catalina, it’s time to track down all these apps and start to take action.

How to find if you have any 32-bit applications installed

You can use the built-in System Information.app to quickly identify any 32-bit applications that are installed on your Mac. First, navigate to /Applications/Utilities/System Information.app. In the left-hand column, under Software click on Applications. On the top at the right, you’ll see 64-bit (Intel) where you can sort the column ascending/descending. “Yes” indicates 64-bit support; “No” indicates 32-bit.

Additionally, you can leverage mdfind to locate files matching a given query. The command we’ll be using is this:

 /usr/bin/mdfind "kMDItemExecutableArchitectures == 'i386' && kMDItemExecutableArchitectures != 'x86_64' && kMDItemKind == 'Application'"

Breaking this command in to parts you get /usr/bin/mdfind that calls the absolute path for the mdfind binary.

Next is "kMDItemExecutableArchitectures == 'i386'. This looks for any file that has an executable architecture that uses i386 (32-bit).

Following that we have && which simply looks at the first and the second statement combined.

The second statement is kMDItemExecutableArchitectures != 'x86_64'. This is looking for any app that DOES NOT use x86_64 (64-bit) as the executable architecture. We look for both applications that support 32-bit and do not support 64-bit. Since some applications list both, you want to find applications that support 32-bit only.

Next is another && to look for the first, second, and final statements.

Last, the final statement kMDItemKind == 'Application' looks for any applications.

To recap, mdfind is told to locate any file that is an application that can launch as 32-bit and cannot launch as 64-bit.

Now take this workflow from a single Mac and expand it!

Using the command above and adding a little more logic you can create a basic script to:

  • run the mdfind command to locate all 32-bit applications
  • grab the application name and add it to a list
  • from here we can do a few things:
    • if there are any 32-bit applications found, populate an extension attribute
    • create an extension attribute that lists all application titles by comma-separated values
    • output a file to the desktop, email it as an attachment, or push the contents to an external destination (such as a Helpdesk ticketing system)

If you simply want to find any Macs that have 32-bit applications installed, you could create a basic script that populates an extension attribute with the number of 32-bit applications found. Here’s an example:

 #!/bin/bash

# set Internal Field Separator (IFS) to newline
# this accomodates app titles/directories with spaces
IFS=$'\n'

# perform `mdfind` search; save it to "SEARCH_OUTPUT"
SEARCH_OUTPUT="$(/usr/bin/mdfind "kMDItemExecutableArchitectures == 'i386' && \
kMDItemExecutableArchitectures != 'x86_64' && \
kMDItemKind == 'Application'")"

# create an empty array to save the app names to
APPS=()

# loop through the search output; add the applications to the array
for i in $SEARCH_OUTPUT; do
 # use `basename` to strip out the directory path
 b=$( /usr/bin/basename -a "$i" )
 APPS+=("$b")
done

# Extension Attribute; if the array is empty, return 0; otherwise return the length
if [ ${#APPS[@]} == 0 ]; then
 echo "<result>0</result>"
else
 echo "<result>${#APPS[@]}</result>"
fi

Once this runs on your client Mac computers, it will populate an extension attribute with the number of 32-bit applications that are installed. If there are none, it will return zero.

Now that you are reporting the number of 32-bit applications installed on a Mac, you can build a Smart Group to find all Mac computers that have at least one 32-bit application.

As noted above, you could expand this workflow a number of different ways to compile a list of all titles. Feel free to continue the discussion on Jamf Nation.

Shane Brown
Subscribe to the Jamf Blog

Have market trends, Apple updates and Jamf news delivered directly to your inbox.

To learn more about how we collect, use, disclose, transfer, and store your information, please visit our Privacy Policy.