[How To] Script the Cleaning of the Font Cache

Tarz

Registered
A corrupted OS X font cache will cause all sorts of layout and display problems with fonts. Unfortunately there's no simple tool or utility available with OS X by default for cleaning up a font cache. That's why I developed a script to clean up a machine's font cache and force a reboot (which is important because deleting the font cache could potentially leave OS X in an unstable state if it tries to use the missing cache files). A bonus of this script is that you can run it on a remote machine via SSH since it's entirely command-line driven (e.g., a help desk can run it on a Mac in another building).

This script is written for OS X 10.3.x. It may or may not work with other versions of OS X. I don't have those available to test with at the moment.

As with any freebie, this is "use at your own risk".

The script is on my web site at:
http://mikesalsbury.com/mambo/content/view/99/2/
 
There are some simple tools to clean out the Font Cache, Yasu being one of them.
 
I know, and I agree that they're often easy to use. Unfortunately in the company I work for, every software purchase requires us to run the license agreement past our Legal department (which usually takes a couple of months) and our Division VP, and our CEO. Rather than jump through all those hoops, I figured out how to script the activity myself and then call that script regularly from a cron task. That has managed to almost completely eliminate the issue of corrupted font cache files on our OS X systems. I figured others might wonder if they can make do without a commercial or shareware product. My script will help those in that situation.
 
Back
Top