Free up a few gigabytes of space on your Mac

Marcel GrĂ¼nauer posted to his Twitter account that he freed up 3 GB by removing non-English localization resource files (*.lproj) with the following command:

find / \
    \! -name 'English.lproj' \
    \! -name 'en.lproj' \
    -name '*.lproj' -type d \
    -exec rm -rf -- {} \; -prune

If you want to make sure you're deleting the right files before you delete them, see the list of the .ljprojf files first:

find / \
    \! -name 'English.lproj' \
    \! -name 'en.lproj' \
    -name '*.lproj' -type d -print -prune

Categories:

3 Comments

ambs said:

I know this is a command line vs application question, but how this compares with Monolingual on saved space? Any hints?

Andy Lester said:

I don't know. I suspect they're about the same. Monolingual also supports a blacklist so that you don't delete localization files for apps that check checksums on themselves.

See http://monolingual.sourceforge.net/changelog.php for some examples.

Be careful with it. I don't know how exactly localization works on a Mac, but you should at least keep the fonts - as much non-Latin fonts as possible. (Deleting strings files for help and error messages in foreign languages is

Even if you don't know Sanskrit, Ankhazian, Hebrew and Japanese, seeing real native characters in Wikipedia articles is rather better than seeing question marks or squares. Again, i haven't ever really used a Mac, but that's how it works on GNU/Linux and Windows when you don't have the fonts installed.

Leave a comment

About this Entry

This page contains a single entry by Andy Lester published on February 26, 2008 9:27 AM.

The rules of Optimization Club was the previous entry in this blog.

How not to do a Changes file is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Other Perl Sites

Other Swell Blogs

  • geek2geek: An ongoing analysis of how geeks communicate, how we fail and how to fix it.