Reducing space taken up by GNU libc locale files

By | February 8, 2008

The GNU libc library comes with a bunch of files which define all of the POSIX locales supported by the library. These files take up hundreds of megabytes, and the vast majority of them are completely unneeded by those of us who only speak a few languages and never attempt to read or enter text written in any others. In the age of cheap 500-GB hard drives, a few hundrew megabytes might not seem like a lot, but if you’re trying to make your Linux installation lean and mean, e.g., if you want to put it on a thumb drive or a CD, or if you are hosted at a site where you pay for your disk space, they can make a big difference.

I’m sure someone has already posted something somewhere on the Web about how to reduce the amount of space taken up by these files, but I couldn’t find it, so I went ahead and wrote my own little script. I’m posting it here so that perhaps the next person who needs to figure out how to do this won’t have to write their own.

If you find this useful, please post a comment here and let me know! I’m interested in seeing how many people other than me are interested in being able to do this.

If there’s something wrong with my script, please post a comment about that too, or send me email.

Download the script from here.

Print Friendly, PDF & Email
Share

Leave a Reply

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