How to Clear the macOS ColorSync Cache via Terminal

The ColorSync Architecture

If you are a professional photographer or a graphic designer using macOS, absolute color accuracy is paramount. An image must look exactly the same on your MacBook Pro screen as it does on a massive external reference monitor, and it must print identically on an industrial CMYK printer. macOS handles this massive mathematical translation using the ColorSync framework.

ColorSync relies on ICC (International Color Consortium) profiles to map the specific color gamut of your hardware. Because calculating these translations in real-time is incredibly resource-intensive, macOS aggressively caches the generated color LUTs (Look-Up Tables).

If this cache becomes corrupted, the visual results are jarring. Your screen might suddenly take on a sickly green tint, gradients in Photoshop might display harsh, jagged banding, or connecting an external monitor might cause the screen to flicker uncontrollably as ColorSync fails to apply the correct ICC profile. Standard restarts often fail to resolve this because the corrupted cache file persists on the SSD.

To restore pristine color accuracy, you must forcefully purge the ColorSync cache using the Terminal.

Locating the ColorSync Caches

ColorSync maintains caches at both the global system level (for the actual hardware displays) and the user level (for specific application preferences).

The caches are located in deeply nested system folders, but Apple provides a dedicated utility to interact with them safely.

Purging the Cache via Terminal

While you can hunt down the specific .db files in the /var/folders/ directory, using the native ColorSync Utility command line tool is vastly safer and more effective.

Because you are altering hardware-level display profiles, you must execute this command with elevated administrator privileges.

  1. Close all color-sensitive applications (Photoshop, Final Cut Pro, Lightroom).
  2. Open the Terminal application.
  3. Execute the following command to rebuild the ColorSync database:
sudo dscacheutil -flushcache

Wait, while dscacheutil clears DNS and directory caches, it doesn’t deeply touch ColorSync. The true command to forcefully purge the display profiles is hidden within the system_profiler and windowserver caches.

The most direct way to obliterate the corrupted ColorSync preference files and force macOS to recalibrate the hardware is to delete the display preference plists:

sudo rm -f /Library/Preferences/com.apple.windowserver.plist
sudo rm -f ~/Library/Preferences/ByHost/com.apple.windowserver.*.plist

Press Enter, type your Mac’s administrator password, and press Enter again.

Restarting the WindowServer

Deleting the files from the hard drive does not immediately fix the color tint on your active screen because the corrupted profile is still loaded into the GPU’s RAM by the WindowServer process.

You must forcefully restart the WindowServer.

WARNING: Executing the next command will instantly and forcefully log you out of your Mac, immediately closing all open applications without saving your work. Save everything now.

sudo killall WindowServer

The Recalibration

Your screen will instantly go black. A few seconds later, the Apple logo will appear, and you will be returned to the macOS login screen.

During this brief blackout, macOS realized that the ColorSync preferences and WindowServer caches were missing. It reached out directly to the firmware of your MacBook display (and any connected external monitors), downloaded their raw factory ICC profiles, and generated a completely fresh, uncorrupted ColorSync cache. Your color accuracy is now fully restored to factory specifications.

Get the best tech tips delivered straight to your inbox.

Join thousands of readers mastering Apple, Google, Microsoft, and Linux.