Skip to content

macos – Remove x86 code from universal app

  • by
Spread the love

I’m using macOS 12 on m1 MBP. There are certain apps that are mostly code and not resource, very large, and not needed in Rosetta. Therefore, I wrote a script to remove x86 component from these applications. However, the script is very slow and the current way of checking that the applications still works is simply to open it, which is not a very comprehensive check. So:

  1. Is there any other solutions, tools, or scripts that can perform this faster?
  2. Is there a more thorough check I can perform to ensure that the application, after removing the x86 code, still works perfectly, and that I can delete the clone / backup I made before the process?

Script in fish:

cd /path/to/application/bundle/
for i in ** ; lipo -extract arm64 $i -o $i.1 ; mv $i.1 $i ; end

Leave a Reply

Your email address will not be published. Required fields are marked *