Cleaning half your iCloud storage, all the Messages attachments

Pet peeve…Apple makes it hard to download all the images/videos you have in Messages. And it really matters because my iCloud Storage is dominated by them. You *could* set your Messages settings to delete anything older than 30 days or 1 year…but, did you get all the pics you wanted?

There is a way! And it doesn’t require buying an app.

It’s because all your attached images/movies live locally on your computer in an accessible place. There is a folder in your user’s home directory called Library, in that is Messages, and in that is Attachments. And in that are 1000s of folders for all your messages with the various attachments inside. It’s not really practical to gather up your pictures from there using the OSX Finder interface.

But you can type a few lines into terminal and copy them all out to a folder on your desktop.

What you need: a Mac that’s linked to the same iCloud

How to:

  1. Open Messages on the Mac and make sure it’s downloaded all the conversations etc
  2. Make a folder on your Desktop called MyMessagesAttachments
  3. Go to System Preferences and into the Security app in there, and give Full Disk Access to Terminal. Now Terminal can let you do things in folders that Apple considers unsafe
  4. Open Terminal
  5. Type “sudo -s” (it might want your password). You are giving yourself permission to be a super user. Be brave
  6. Type “pwd”. It will show something like “/Users/username” <– “username” is your username on this Mac. You’re going to replace that word in the instructions below with your actual username
  7. Now type this: find /Users/username/Library/Messages/Attachments -type f -size +100k -exec cp {} ~/Desktop/MyMessagesAttachments/ \;
  8. It kind of runs for a bit then there is a folder on your desktop with all your pictures and videos (all files greater than 100kb in size actually, but now you can manage it all way easier)
  9. Now type: chmod 777 /Users/username/Desktop/AmolsMessages/*
  10. Go to your Desktop in Finder on your Mac (in the normal UI) and check out that folder…
  11. You an change the Messages settings now to remove old stuff (it will remove old texts and images and videos…so you are still losing old chats, sorry)

You don’t get any metadata with these images; they are all stamped as created just now.

But that’s good enough for me…. Enjoy! (Hit me up by the way if you have any issues.)

Also, I suspect you can just ask Bing/ChatGPT to walk you through this. I asked it lots of ways for help with the *problem*, but at some point it occurred to me that using the file system was a good idea and I typed this in below. That led me to the answer.

is there a shell command I can use in terminal on my mac to descend down all the subfolders in a directory and copy out all the files it finds that are greater than 100kb in size? I want to put them all in a specific folder named “AmolsMessages” on my desktop.