Quick answer
Messages stores photos, videos and files in ~/Library/Messages/Attachments, and Mail keeps your mailboxes in ~/Library/Mail. Do not delete files in these folders by hand. Remove attachments in System Settings > General > Storage > Messages, set Messages > Settings > General > Keep messages to 1 Year, and use Message > Remove Attachments in Mail.
On this page
Where Messages and Mail keep their data
Both apps keep their data in your hidden Library folder. The folders can grow to many gigabytes when people send you photos and videos for years. They are one part of what fills a Mac and what is safe to delete.
~/Library/Messages: your message history. Messages uses it to show your conversations.~/Library/Messages/Attachments: photos, videos, voice messages and files from your conversations.~/Library/Mail: your mailboxes, the messages Mail downloaded and the index Mail uses to search them.~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads: copies of attachments you opened in Mail.
To open one of these folders, choose Go > Go to Folder in Finder, type the path and press Return. Other apps, such as a disk cleaner, usually need Full Disk Access in System Settings > Privacy & Security to read ~/Library/Mail.
Storage settings shows Messages as its own category, with a list of attachments you can review. For other hidden Library data, see what System Data contains.
What is safe to delete
| Path | What it is | Safe to delete | What happens if you delete it | How to clean it |
|---|---|---|---|---|
~/ | Photos, videos and files from Messages | Careful | They are gone from the conversation; with Messages in iCloud on, from your other devices too | Storage settings > Messages, or Keep messages |
~/ | Your message history | No | You lose conversations that are not stored in iCloud | Delete conversations inside Messages |
~/ | Mailboxes, downloaded messages and the Mail index | No | Mail must rebuild; mail that exists only on this Mac is lost | Delete mail or remove attachments in Mail |
~/ | Copies of attachments you opened in Mail | Careful | Originals stay in the emails; an attachment you edited and saved can exist only here | Mail > Settings > General > Remove unedited downloads |
| Attachments inside emails | Files stored in each message | Careful | The file is removed from that message | Message > Remove Attachments, after you save the file |
~/ | Attachments you saved from Mail or Messages | Careful | You lose your saved copy | Sort by size in Finder and delete what you do not need |
Clean up Messages attachments
Work from the safest step to the riskiest. Save photos and files you want to keep before you delete anything.
Review large attachments in Storage settings
- Choose Apple menu > System Settings > General > Storage.
- Wait for the bar to finish. Then click the Info button next to Messages.
- The list shows attachments with their sizes. Sort by size to see the largest first.
- Select the attachments you do not need and click Delete. Click Done.
Delete old messages automatically
- Open Messages and choose Messages > Settings, then click General.
- Click the Keep messages pop-up menu and choose 1 Year or 30 Days. Forever keeps everything.
- Messages asks you to confirm. It then deletes messages and attachments older than the period you chose.
Delete one conversation or attachment
In Messages, Control-click a conversation and choose Delete. To remove single photos and files, select the conversation, click the Info button and look under Photos and Files. Control-click an item and choose Delete.
How Messages in iCloud changes the picture
Messages in iCloud keeps your conversations and attachments in iCloud and in sync on your Apple devices. Turn it on in Messages > Settings > iMessage, then select Enable Messages in iCloud. The data then counts toward your iCloud storage.
Storage settings can recommend Store in iCloud, which includes Messages. Apple says that when space is needed, older attachments then stay only in iCloud, and the Mac keeps recent ones. This frees space without deleting anything.
There is a cost. Because deletions sync, deleting an attachment to free space on the Mac also deletes it in iCloud and on your iPhone. If you want an attachment on your phone but not on the Mac, let Messages in iCloud manage the space instead of deleting.
For more on online-only files, read how iCloud Drive and OneDrive keep files in the cloud.
Clean up Mail attachments
Stop Mail downloading every attachment
- In Mail, choose Mail > Settings, then click Accounts.
- Select the account, then click Account Information.
- Set Download Attachments to Recent or None. Mail then downloads older attachments only when you open them.
This setting is for accounts that keep mail on a server, such as iCloud, IMAP and Exchange accounts.
Clear Mail Downloads
- Choose Mail > Settings and click General.
- Set Remove unedited downloads to After Message is Deleted or When Mail Quits.
Mail then removes the copies it made when you opened attachments. Copies you edited stay, because they can be the only version of your change.
Remove attachments from emails
- Save any attachment you want to keep: Control-click it and choose a save option.
- Select the message, or several messages.
- Choose Message > Remove Attachments.
The emails stay, but the files are gone from them. Keep your saved copy somewhere safe.
Delete old mail and empty the Trash
Delete messages you do not need, then choose Mailbox > Erase Deleted Items. Large messages in the Trash and Junk mailboxes use space until you erase them.
Why you should not delete files in ~/Library/Mail by hand
~/Library/Mail is not a cache. It holds your mailboxes and the index Mail uses to list and search them. If you delete parts of it, Mail can show empty mailboxes, re-download all mail from the server, or lose mail that is stored nowhere else.
Mail in On My Mac mailboxes, and mail from POP accounts that remove messages from the server, can exist only on this Mac. Deleting those files deletes the mail. Always clean up inside Mail, so it updates its own index.
How KemptDesk handles this
KemptDesk's Hidden space page lists ~/Library/Messages and shows its size. Messages/Attachments is Check first, with a hint to set Keep messages to 1 year. ~/Library/Mail is Protected: KemptDesk explains it and tells you to manage mailboxes and attachments in Mail. KemptDesk never removes the Messages or Mail folder as a whole.
System Junk has a Mail attachments cache category for Mail Downloads. It is not selected for you and needs Full Disk Access. Its files go to the Trash when the Trash setting is on, which is the default, because an edited attachment can exist only there. KemptDesk does not change Messages or Mail settings and does not remove attachments from inside emails.
Questions
Why do Messages take up so much space on my Mac?
Every photo, video and file sent in your conversations is kept in ~/Library/Messages/Attachments. With Keep messages set to Forever, nothing is ever removed.
Can I delete the Messages Attachments folder?
Not by hand. Delete attachments in Storage settings or in Messages, so the app stays in step with its files.
If I delete messages on my Mac, are they deleted on my iPhone?
Yes, if Messages in iCloud is on. Apple says deletions then apply to all your devices that use it.
Is it safe to delete Mail Downloads?
Mostly. The originals stay in the emails. An attachment you edited and saved there can exist only in that folder, so let Mail remove unedited downloads, or check the files first.
How do I stop Mail from downloading attachments?
In Mail > Settings > Accounts > Account Information, set Download Attachments to Recent or None.
Sources
- Change Storage settings on Mac (Mac User Guide)
- Optimize storage space on your Mac (Mac User Guide)
- Change General settings in Messages on Mac (Messages User Guide)
- Delete messages and conversations in Messages on Mac (Messages User Guide)
- Use Messages in iCloud on Mac (Messages User Guide)
- Change General settings in Mail on Mac (Mail User Guide)
- Change Account Information settings in Mail on Mac (Mail User Guide)
- Remove attachments in Mail on Mac (Mail User Guide)
- Delete emails and manage storage in Mail on Mac (Mail User Guide)
- Remove images and attachments from Messages (Apple Community, question wording)
- If I set my Mac to keep messages for only 30 days, will it erase the history on my iPhone? (Apple Community, question wording)