Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Astrohunter

macrumors 6502
Original poster
Sep 16, 2021
270
168
Hi,

I manually remove this folder from time to time since it can grow to like 40GB+
I'm on latest developer beta, had this issue before though.

Anyone knows what is this junk?



Thanks
Screenshot 2025-01-04 at 17.27.31.png
 
this is ridiculous. I just deleted that cache and the daemon immediately started growing it again.

Apple needs to fix this crap. I had gotten down to under 10gb free space. all the "optimize storage" options are on.

not amused.
 
  • Like
Reactions: Astrohunter
I can't report it sadly since I'm on beta, but then I doubt it would change anything anyway...
 
@Astrohunter, what version of macOS are you using? I saw other forum posts from a few months ago indicating this issue may have been fixed in 15.1 (although we are now to 15.2).
 
Damn. That sucks. I'm considering the following solution (two websites seem to be basically the same article) but it seems a bit nuclear. Basically removing the service entirely. :/

 
Damn. That sucks. I'm considering the following solution (two websites seem to be basically the same article) but it seems a bit nuclear. Basically removing the service entirely. :/

https://www.gamingdeputy.com/how-to-stop-mediaanalysisd-from-loading-your-cpu-in-macos/
https://appleinsider.com/inside/mac...mediaanalysisd-from-hogging-your-cpu-in-macos
Those are just nonsense. You can’t delete /System/Library/LaunchAgents/com.apple.mediaanalysisd.plist

But you can stop it. See https://forums.macrumors.com/thread...ysisd-and-photolibraryd.2445597/post-33630693
 
  • Like
Reactions: Astrohunter
I've tried it on fresh install, after some time I've noticed it's there again, 30GB!
Is your account the main admin? That is, if you run echo $UID in Terminal, does it return 501?

SIP must stay disabled in order for launchctl disable to work. If SIP is re-enabled, mediaanalysisd is automatically enabled.
 
  • Like
Reactions: Astrohunter
Is your account the main admin? That is, if you run echo $UID in Terminal, does it return 501?

SIP must stay disabled in order for launchctl disable to work. If SIP is re-enabled, mediaanalysisd is automatically enabled.
Yes it is.
I've re-enabled SIP also.

Isn't it dangerous to have SIP disabled?

Perhaps it would be possible to write some automation/script to remove that folder every hour or so.
 
Here is another solution, that should work with SIP enabled.
Terminate mediaanalysisd and delete the contents of the cache folder:

Code:
killall mediaanalysisd; rm -r ~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches/*

Lock the cache folder, so that it can not be written in:

Code:
sudo chflags schg ~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches

To revert, unlock the folder:
Code:
sudo chflags noschg ~/Library/Containers/com.apple.mediaanalysisd/Data/Library/Caches
 
After testing the previous command, I’ve deleted the folder Catches and now I can’t get mediaanalysisd to create it again. :) I’ll try on another installation.
 
I don't want SIP disabled, so I open a terminal window and type this:
Code:
while true; do killall mediaanalysisd; sleep 600; done
;)
 
  • Haha
Reactions: bobpaw
I don't want SIP disabled, so I open a terminal window and type this:
Code:
while true; do killall mediaanalysisd; sleep 600; done
;)
I think I just right clicked on the folder and disabled write permissions, seems to work for now.
 
On Windows, Microsoft allows you to disable services. Why does Apple insist that these services run even if you don’t use their so called functionality.
 
On Windows, Microsoft allows you to disable services. Why does Apple insist that these services run even if you don’t use their so called functionality.
Technically I think you can if you disable SIP.
 
Let me rephrase what ifxf said. I can understand why Apple would need to protect some services under the SIP umbrella. However, DAMIT, it is my computer and I would like a lot more control over processes like this one that are not doing anything I need and are taking up MY resources (disk and CPU). You should not need to do things like disable SIP or play games like locking where the process wants to write in order to just make it not run.

And, if this is something I need then clearly explain in an Apple document that explains what all these beasties are doing why it is I need it. Not why Apple needs it, but why I need it. Would that be so hard?
 
Let me rephrase what ifxf said. I can understand why Apple would need to protect some services under the SIP umbrella. However, DAMIT, it is my computer and I would like a lot more control over processes like this one that are not doing anything I need and are taking up MY resources (disk and CPU). You should not need to do things like disable SIP or play games like locking where the process wants to write in order to just make it not run.

And, if this is something I need then clearly explain in an Apple document that explains what all these beasties are doing why it is I need it. Not why Apple needs it, but why I need it. Would that be so hard?
Well I do agree. On the other hand Windows is much worse when it comes to forcing user to do what they want, like re-enabling stuff you've disabled after updates etc. 🤷🏻
 
Well I do agree. On the other hand Windows is much worse when it comes to forcing user to do what they want, like re-enabling stuff you've disabled after updates etc. 🤷🏻
I've noticed this behavior from macOS lately, altering your settings after updates. For example, I have never, EVER, had my system configured to store keychains on iCloud, yet when I was trying to sort out a keychain-related problem earlier today I discovered that my keychain was indeed up in iCloud. I guess they're just trying to keep me "safe" despite my best efforts. (Sorry, but it's just so nice to rant about something that isn't likely to end up with us all dead or living in caves that I can't help myself.)
 
I've noticed this behavior from macOS lately, altering your settings after updates. For example, I have never, EVER, had my system configured to store keychains on iCloud, yet when I was trying to sort out a keychain-related problem earlier today I discovered that my keychain was indeed up in iCloud. I guess they're just trying to keep me "safe" despite my best efforts. (Sorry, but it's just so nice to rant about something that isn't likely to end up with us all dead or living in caves that I can't help myself.)
No idea, perhaps you've enabled it without noticing? According to ChatGPT some of the reasons might be:

1. iCloud Keychain Was Enabled Without Realizing

  • When setting up a new Mac or updating macOS, Apple sometimes prompts users to enable iCloud Keychain as part of the iCloud setup process.
  • It’s possible they unintentionally agreed to enable it at some point.

2. Keychain Syncing Enabled via Another Device

  • If the user has multiple Apple devices (e.g., an iPhone or iPad) and enabled iCloud Keychain on one of them, it could have activated syncing across all devices, including the Mac.

3. macOS Update or Migration Assistant

  • A macOS update or using Migration Assistant might have enabled iCloud Keychain as part of system preferences being restored.

4. Family Sharing or Apple ID Settings

  • If the user is part of a Family Sharing group, sometimes iCloud Keychain settings may be influenced by shared Apple ID configurations.

5. Accidental iCloud Sign-in with Keychain Syncing

  • If the user signed into iCloud with their Apple ID at any point, they may have unknowingly enabled Keychain syncing without explicitly checking the box.
Anyway I don't think you can compare Mac OS to Windows in this regard, I've my Mac set up how I like it and after any updates/upgrades nothing changes for me. Neither system is perfect though.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.