How to clear font corruption in OS X with these Terminal commands

Font corruption affects OS X and installed apps, making the screen unreadable. Solve this annoyance by resetting the font cache and database with a few simple commands.

Image: Apple

If the fonts on your screen look like the gibberish in the image above, you might not even want to use your computer. Unfortunately, once this font corruption issue occurs in OS X and installed apps, it typically doesn't resolve on its own or through updates.

So how do you get your computer working properly again? With some well-placed Terminal commands, of course.

  1. Power on your Mac holding down the Shift key. Continue holding down the Shift key while the Mac boots to access Safe Mode.
  2. While in Safe Mode, the Mac will load only the basic OS files necessary to boot the system. In this mode, the font should look normal; however, performance will be minimal. Launch the Terminal.
  3. Enter this command to simultaneously clear the Font Cache and remove the Font Database: sudo atsutil database -remove. (Note: No fonts will be deleted or removed.)
  4. Enter a command to repair your Mac's volume. (This is optional, though it's advised because it corrects file system issues that may persist.)
    If you're using OS X 10.11, enter the command: sudo /usr/libexec/repair_packages --repair --standard -pkgs /. If you're using OS X 10.10 (or older), enter the command: sudo diskutil repairPermissions /.
  5. Once the repair process successfully completes (which may take awhile), reboot your Mac manually or enter the following command to do so from the Terminal: sudo shutdown -r now.

The Mac should boot OS X normally (not Safe Mode), and the font cache and database will be rebuilt. The font that displays on-screen should be readable.

Also see