3

I am aware about an application that is able to remove unneeded architectures from Universal binaries - XSlimmer.

Still, I am looking for a free solution for this because I am not willing to pay for this kind of service.

nohillside
  • 100,768
sorin
  • 29,875
  • 2
    You probably know already, but just be aware that removing 'unneeded' architectures can cause software update issues due to checksum failures and other such problems, so make sure you have a good backup first. For the amount of disk space you're likely to save, I'm never convinced it's worth the risk. – calum_b May 29 '11 at 11:05
  • 1
    The amount of disk space you can save is huge, this is why I am interested in this solution. – sorin May 29 '11 at 21:39
  • 2
    On my system, where I have almost 200 applications in /Applications, Monolingual removed about 10 GB of data. On my wife's system, where there are far fewer applications, it removed 3 GB of data. I removed languages and architectures. – Chuck May 29 '11 at 22:03
  • Well okay, I suppose it depends on your definition of 'huge', but I still consider the adage 'disk space is cheap' to be be worth bearing in mind here. If you're sweating over 10GB or less, it's probably time to think about upgrading your hard drive anyway-- OS X performance will be starting to degrade with so little free space, and it's probably taken you a year or two to fill it up that much, so you'll probably be somewhat nearer the end of the drive's mechanical life than its beginning. – calum_b May 31 '11 at 16:58
  • I have a 500GB disk and yes it's not so big, if you use it with two versions of xcode, two os version, a windows with visual studio inside, and some music.... – sorin May 31 '11 at 18:11

2 Answers2

6

All tools to manipulate architectures in binaries are covers over lipo the command line tool that Apple supplies as part of the Developer tools

mmmmmm
  • 30,160
  • Thanks, now I just have to hope that someone will write a script that would use lipo :) – sorin May 29 '11 at 08:54
  • lipo -remove ppc executable – mmmmmm May 29 '11 at 08:57
  • 2
    Note, too, that lipo -info filenamehere will list the architectures an app includes, in case you're uncertain. – Matthew Frederick May 29 '11 at 10:04
  • 1
    Based on this it shouldn't be too hard to create a script that does the cutting for /Applications/. Also it should have a blacklist, I'm sure there will be applications that will fail to work if you play with them. – sorin May 29 '11 at 11:21
  • Unfortunately, most of the apps in /Applications are SIP-protected. Disabling and re-enabling SIP is a nuisance, and you'd have to repeat it frequently due to software update. – WGroleau Dec 31 '20 at 08:54
4

Monolingual will remove extraneous languages and architectures and is open source.

Chuck
  • 1,780