What is com.apple.mediaanalysisd, and why is it so big?
- Location
~/Library/ Containers/ com.apple.mediaanalysisd - Safe to delete?
- Yes, it rebuilds itself Cache for macOS photo analysis. No photos inside, and macOS rebuilds it.
com.apple.mediaanalysisd is the working folder for mediaanalysisd, the macOS process that scans your images for faces, objects and text. It holds caches, not your photos. Clearing the cache folder inside it is safe, and macOS rebuilds what it needs. If it keeps refilling fast, a macOS bug is the usual suspect, so update macOS first.
What is com.apple.mediaanalysisd?
mediaanalysisd is a background process built into macOS. It does on-device image analysis, the kind of work behind face recognition in Photos, Live Text, and Spotlight finding pictures by what’s in them. The Eclectic Light Company looked at what macOS Sonoma finds in images, including text and objects that Spotlight can search, and a reader in the comments logged mediaanalysisd tasks named photos.face, photos.ocr and photos.visualsearch.
It runs under your user account, and macOS gives it a sandbox container, a private home folder that the system creates in ~/Library/Containers. That’s why the folder you found sits at:
~/Library/Containers/com.apple.mediaanalysisd
The part that grows is deeper, at Data/Library/Caches/com.apple.mediaanalysisd inside that container. It usually holds a folder called com.apple.e5rt.e5bundlecache, then a folder named after a macOS build number, then a pile of long, hash-named files. It’s the same idea as the app caches in ~/Library/Caches, just tucked inside a container.
Is it safe to delete?
Yes, the cache folder is. Apple’s rule for any Caches folder is that it holds “cached data that can be regenerated as needed” (File System Programming Guide). In a long Apple Community thread, people who cleared it reported no problems beyond the folder coming back.
A few things to know before you do:
- Your photos aren’t in here. Your Photos library lives in your Pictures folder, and it’s managed separately.
- Expect some background work afterward. mediaanalysisd recreates what it needs, so you may see it busy for a while after a restart.
- Go straight to the Caches folder. The container is full of links back to your real folders. Data holds links named Desktop, Downloads and Pictures, and Data/Library holds links named Keychains, Mail and Calendars. Leave all of them alone and use the exact path in the steps below.
Why it gets so big
Normally it stays small. The runaway growth is a bug. After macOS Sequoia 15.1 came out, the original poster in that Apple Community thread saw a new file of about 68 MB appear roughly every hour while the Mac wasn’t in use, and the folder kept growing. OSXDaily rounded up reports of the folder reaching 50 GB, 80 GB and even 140 GB.
The hourly rhythm matches how macOS schedules the process. On current macOS, its launch file at /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist asks for a background pass about once an hour, and only while you’re not using the Mac. If each pass leaves a new file behind, the folder keeps climbing.
Later replies in the same thread say updates calmed it down. One person on macOS 15.5 said their com.apple.mediaanalysisd container stayed mostly under 200 MB. It isn’t fixed for everyone, though. Another poster said 15.3.2 didn’t fix it.
Legitimate work can keep the process busy too. Apple says Photos on a Mac finds the pets in your library while you aren’t using the app, and that this can take up to a few days depending on the library’s size (Apple Support). A big import means a lot of new photos to analyze.
How to clear it yourself
- Update macOS. Open System Settings, then General, then Software Update, and install what’s offered (Apple’s steps). If the bug filled the folder, clearing it without updating only buys you time.
- Open the cache folder. In Finder, choose Go > Go to Folder, paste
~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches, and press Return. - Check the size. Select the
com.apple.mediaanalysisdfolder and choose File > Get Info. If it’s small, stop here. There’s little to gain. - Move it to the Trash. Drag that one
com.apple.mediaanalysisdfolder to the Trash. Leave everything else in the container where it is. - Restart your Mac. mediaanalysisd starts a fresh, small cache the next time it runs.
- Empty the Trash. Emptying is permanent, but nothing in this folder is worth getting back.
- Check again in a week. If it’s climbing by gigabytes again, the bug is still active on your version of macOS. Watch for the next update.
A Time Machine backup is still worth having before any cleanup. If you’re chasing more space, the System Data guide and our manual disk space guide cover the other usual suspects. Another Apple folder with a scary name is com.apple.mobileAssetDesktop.
What SpaceUp Mac does with it
Deep Scan checks only the cache inside the container, Data/Library/Caches/com.apple.mediaanalysisd, and when that cache is 80 MB or larger it lists it as “Cache · safe to clear” with a short note saying macOS rebuilds it and only the cache inside is cleared. If you choose to remove it, SpaceUp Mac moves just that cache folder to the Trash, where you can put it back, and leaves the rest of the container alone (cleaning and safety). macOS can refuse access to another app’s container, and if the move fails, Deep Scan says it couldn’t move the item, so the manual steps above are the fallback. The Clean tab doesn’t touch this folder, and SpaceUp Mac doesn’t stop macOS from refilling it.
Common questions
Will deleting it remove my photos?
No. Your photos live in your Photos library, and this folder only holds the analysis process’s cache. Nothing in it is something you made.
There’s also a com.apple.mediaanalysisd folder inside my Photos library. Can I delete that one?
Leave it. If you got there with Show Package Contents, you’re inside the library itself, and Apple says not to access or alter a library’s contents in Finder. Only clear the copy under ~/Library/Containers.
Can I stop mediaanalysisd from running?
There’s no switch for it in System Settings. Apple says Photos on a Mac does its pet detection while you aren’t using the app (Apple Support), so leaving Photos open may hold off some library analysis. It won’t stop the process, which also runs on its own schedule.
Why does the folder come back after I delete it?
macOS recreates it the next time the process runs. A small folder is normal. Tens of gigabytes within days means the growth bug is still active, and updating macOS is what helped most people in the Apple Community thread, though not everyone.