How to clean up and reclaim space from a large folder in Messages on macOS?

Hi all,


if you ever had or currently have the problems of finding the folder


/Users/<username>/Library/Containers/com.apple.MobileSMS/Data


filled with GBs or even TBs of data here is a solution which might help you. Not sure if this is the only solution, or one Apple would recommend, but I post about it here anyway.


Recently I run a storage analysis for my main macOS disk and found the folder ~/Library/Containers filled with GBs of temporary data. In addition to some folders assigned to various applications I saw that the folder


/Users/<username>/Library/Containers/com.apple.MobileSMS/Data


was really very full. I saw a subdirectory tmp in which macOS or Messages had stored temporary versions of files in iCloud, attachments, etc.


Looking for a solution on the internet how to clean this up and reclaim the space was not really successful. Reboot did not work, stopping and restarting the Messages app neither, ...


As I did not want to simply delete the folder tmp I tried this workflow which seems to work successfully:


  1. Start Messages app
  2. Go to Settings -> iMessage, and do 'Sign Out' for your Apple Account (I did not switch off the 'Enable Messages in iCloud' option).
  3. Close the Messages app
  4. Open a Finder window and go to folder /Users/<username>/Library/Containers/com.apple.MobileSMS/Data (You could also open a terminal and go there using the cd command).
  5. Move the tmp folder to the Trash (always good to keep it there until the end of the workflow, just in case a 'Put Back' is needed. One never knows ...)
  6. Restart the Messages app. In my case, the tmp folder was recreated but stayed empty.
  7. Go back to Settings -> iMessage in the Messages app and log on to your Apple account


That's it. All my messages appeared again (coming from iCloud).


At the end I made a test to see where the content in that tmp folder comes from. I created a test iMessage to myself and attached a 300MB file, using the Blender installation dmg file which I had downloaded the day before.


I was surprised to see the dmg file showing up twice (!) in the tmp folder structure although the message in Messages was not delivered successfully:



As you can see above, the file shows up in a folder 'LinkedFiles' and 'Media'. One can imagine that sending many messages in the App over time, with attachments or links to files, can fill up that tmp folder quite fast. But the files do seem to stay there forever. I expected a temporary folder called tmp to hold files which are deleted again when the app is not used but the content seems to stay there even when doing a reboot.


Anyway, the procedure described above worked for me. After going through the steps the Messages app was working as it should be, all my messages were still there, and the folder /Users/<username>/Library/Containers/com.apple.MobileSMS/Data had a much smaller size.


Problem solved.


Maybe someone from Apple can comment here how this tmp folder for the Messages App in the Containers structure does work, and what the best/official/compliant way is to keep it at a small size.



Best regards


Roland



[Re-Titled by Moderator]

Mac mini

Posted on Apr 15, 2025 6:08 PM

Reply
1 reply

Apr 15, 2025 9:43 PM in response to rolandwartenberg

rolandwartenberg wrote:


Maybe someone from Apple can comment here how this tmp folder for the Messages App in the Containers structure does work, and what the best/official/compliant way is to keep it at a small size.


[Re-Titled by Moderator]



Apple does not comment here in the user to user Community Support forums.


You can however—


Call Customer Support (800) MY–APPLE (800–692–7753)


or on line https://getsupport.apple.com/


Outside the USA—Contact Apple for support and service by phone

See a list of Apple phone numbers around the world.

Contact Apple Support - Apple Support


or

file a bug report / submit your Apple Feedback here: Product Feedback - Apple



What I can say about the recent macOS's and the new apfs format—


the macOS does not readily release that "purgeable" space, but on its own schedule or as needed...

“free” space is the "available" minus the "purgeable"





This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

How to clean up and reclaim space from a large folder in Messages on macOS?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.