How to Use the macOS lipo Command to Inspect Universal Binaries

When Apple transitioned its Mac lineup from Intel processors to custom Apple Silicon (M1, M2, M3), developers faced a significant challenge: software compiled for Intel (x86_64) could not run natively on Apple Silicon (arm64). To ensure a smooth transition, Apple introduced \”Universal Binaries.\” A Universal Binary is essentially a single application file that secretly contains both the Intel code and the Apple Silicon code wrapped together. The operating system automatically runs the correct version. However, if you are a developer or a power user who needs to verify exactly which architectures are packed inside an application, you must use the macOS lipo command.

Why Use the lipo Command?

The graphical macOS Finder does not explicitly tell you the internal architecture of a binary file. It simply labels the application as \”Universal.\” The lipo command-line utility provides deep inspection capabilities. It allows you to mathematically analyze a binary file, list the exact CPU architectures it supports, extract a specific architecture into a standalone \”thin\” binary, or even combine separate Intel and Apple Silicon binaries into a single new Universal Binary. It is the definitive tool for managing cross-platform application execution on modern Macs.

Step 1: Inspect a Universal Binary

The most common use case is simply verifying if an application has been updated to support Apple Silicon, or if it is still relying on the Rosetta 2 translation layer.

  1. Open the macOS Terminal.
  2. You must target the actual executable binary inside the application bundle, not just the `.app` folder. For example, to inspect the Google Chrome browser, type the following command using the -info flag:
lipo -info /Applications/Google\\ Chrome.app/Contents/MacOS/Google\\ Chrome

If the application is fully optimized, the terminal will output: Architectures in the fat file: x86_64 arm64. (Note: macOS historically refers to Universal Binaries as \”fat files\”). If it only outputs x86_64, the app is Intel-only.

Step 2: Extract a Thin Binary

If you are deploying software to a fleet of machines that strictly use Apple Silicon and you want to reduce the file size of the application, you can use lipo to strip out the unnecessary Intel code.

  1. Use the -thin flag to specify the architecture you want to keep, and the -output flag to define the new file:
lipo /path/to/UniversalApp -thin arm64 -output /path/to/ThinApp_arm64

This command extracts only the Apple Silicon (arm64) code, creating a smaller, specialized executable.

Step 3: Create a Universal Binary

Conversely, if you are a developer who has compiled two separate versions of an application (one for Intel, one for Apple Silicon) and you want to distribute them as a single file, you can merge them.

  1. Use the -create flag followed by the two source files, and define the destination with -output:
lipo -create /path/to/MyApp_x86_64 /path/to/MyApp_arm64 -output /path/to/MyApp_Universal

The resulting MyApp_Universal file will now seamlessly run natively on any Mac hardware.

By utilizing the lipo command, macOS power users and developers gain absolute control over application architecture, ensuring optimal performance across the Apple ecosystem.

Get the best tech tips delivered straight to your inbox.

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