General Mac OS X Discussion General Apple and Mac OS X Discussion

Thread Tools Display Modes
  (#1) Old
simonlok simonlok is offline
Junior Member
Posts: 2
Join Date: Jul 2009
Default reducing footprint by removing ppc code out of universal binaries - 07-05-2009, 01:53 PM

After installing OS X onto a Dell Mini 9 following the guides available here, I found that I was a bit lacking in disk space. Since OS X, iLife 09 and iWork 09 all ship as universal binaries, I figured it should be possible to reduce the amount of disk space used by deleting the PPC code out of the UB files. This turned out to be easier than expected.

OS X comes with a utility called "lipo" that allows you to manipulate universal binary files. If you install the developer's tools, you will get a man page for lipo that is very detailed. The goal is to preserve only i386 code in the UB files since the Dell Mini is an i386 machine. The proper utilization is as follows:

lipo -thin /Applications/ -output /tmp/MYAPP.thin

Then you should be able to:

mv /tmp/MYAPP.thin /Applications/

To get the list of files that you want to do this to, run a:

find /Applications/ -type f | grep Contents | grep MacOS

There are also UB files in /Library and /System/Library

After running lipo -thin on what I could find easily with a few searches, I managed to recover 650 MB of disk space. Not bad for 5 minutes of keyboarding and about 20 minutes of the Dell Mini working on it's own.
Reply With Quote
  (#2) Old
simonlok simonlok is offline
Junior Member
Posts: 2
Join Date: Jul 2009
Default 07-05-2009, 02:10 PM

Also, along the same lines, you can use the following command to remove the localization strings:

sudo /usr/bin/find /Applications -type d -name '*.lproj' ! -iname 'en*' -exec rm -r {} ';'

I recovered about 2 GB of disk space using the above command and things appear to work fine.

I know some people are posting about monolingual and Xslimmer to do something similar. I prefer to be in control of exactly what's going on. Also, I believe that Xslimmer is asking for a small fee which is perfectly reasonable but probably unnecessary.
Reply With Quote
  (#3) Old
kommissar kommissar is offline
Posts: 91
Join Date: Jul 2009
Default 07-05-2009, 03:35 PM

really great find, and good thinking! this will be particularly useful for the ssd crowd.
Reply With Quote

« mac os x does not find mouse on dell mini 9 atfer 10.5.6 combo update | Strange Cursor Question »
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Copyright © 2008-2016