Safe to Delete

macOS Photos.app Analysis & Facial Recognition Database (mediaanalysisd)

Quick Answer: macOS background process mediaanalysisd stores facial recognition, object detection, and visual search index databases in ~/Library/Containers/com.apple.mediaanalysisd. Learn how to manage it.

Bottom Line: It is safe to clear mediaanalysisd cache containers. macOS Photos app uses background AI models to index faces, memories, and text OCR across your photo library.


Why Does macOS Photos Analysis Cache Exist?

When your Mac is idle and plugged into power, macOS runs background daemons (mediaanalysisd, photoanalysisd) that scan photos for facial recognition, pet detection, scene analysis, and Live Text OCR indexing.

  • Primary Purpose: Local AI indexing for visual search, memories, and facial grouping inside Photos.app.
  • Storage Impact: Large photo libraries with 50,000+ images generate 2 GB to 15 GB of analysis database files.
  • Location: Stored in ~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches.

What Happens If You Delete Photos Analysis Cache?

  • System Safety:100% Safe to Delete. Original full-resolution photos remain 100% safe.
  • Background Re-indexing: macOS will pause visual search until photos are analyzed again when idle.
  • Reclaimed Storage: Frees 2 GB to 15 GB of SSD space.

How to Clear Photos Analysis Cache

# Clear mediaanalysisd cache container
rm -rf ~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches/*

Frequently Asked Questions (FAQ)

Why is photoanalysisd using 100% CPU on my Mac?

After importing thousands of new photos or installing a major macOS update, photoanalysisd runs background machine learning models to index images. The CPU spike stops automatically when indexing finishes.

Discussion

Loading authentication...

Related in macos

macOS Background Download Session Cache (com.apple.nsurlsessiond)

nsurlsessiond caches incomplete background file downloads for system apps and iCloud daemon sync. Clearing the cache is safe.

Safe to Delete

macOS Font Server Cache (/var/db/ats)

Apple Type Services (ats) caches font rendering metrics. Resetting the font cache fixes corrupted font glyphs and system text glitches.

Safe to Delete

macOS System Font Cache Directory (com.apple.fontd)

macOS caches system and user font rendering structures in com.apple.fontd. Learn how to reset macOS font cache to fix garbled text.

Safe to Delete
Back to all files