Mail Taking Up Space on Your Mac? Don't Delete ~/Library/Mail
~/Library/MailNo, don't delete ~/Library/Mail. That folder is your actual email: every message, attachment, and mailbox that Apple Mail manages on this Mac. If Mail is eating tens of gigabytes, the fix is to make Mail store less, not to drag the folder to the Trash. The steps below shrink it without losing anything you care about.
What it is
~/Library/Mail is Apple Mail's entire local database. Inside you'll find a versioned folder (V10 on recent macOS releases) with one subfolder per email account, plus a MailData folder holding the Envelope Index that powers search. Every message Mail has downloaded lives here as a file on disk, and so does every attachment that came with it.
It grows because Mail's default is to keep a full local copy of everything. Each account you add, and every year of PDFs, photos, and video clips people have sent you, lands in this one folder. A light setup might use 2 to 5 GB. A couple of old accounts with a decade of attachments can push it past 30 or 50 GB, which is why Mail often ranks near the top in System Settings storage.
Is it safe to delete?
There is no junk layer here to skim off. Deleting this folder does not clear a cache; it wipes your local mail database. IMAP and Exchange accounts will re-sync from the server, so those messages eventually come back after a long re-download and a full re-index. POP accounts and any mailboxes filed under On My Mac exist only in this folder. Delete it and that mail is gone for good, with no server copy to recover from.
The safe way to reclaim the space is inside Mail itself: erase deleted and junk mail, strip attachments you've already saved, and tell Mail to stop downloading every attachment automatically. Diskmack flags ~/Library/Mail as personal data rather than junk, so it reports the size but never queues it for deletion.
How to check its size
In Finder: In Finder, choose Go > Go to Folder, enter ~/Library and press Return. Select the Mail folder and press Command-I to see its total size.
In Terminal:
du -sh ~/Library/MailmacOS shields this folder, so if du says Operation not permitted, grant Terminal Full Disk Access in System Settings > Privacy & Security and run it again.
How to clean it
- Open Mail and choose Mailbox > Erase Junk Mail, then Mailbox > Erase Deleted Items > In All Accounts. Deleted messages often sit in Trash mailboxes for months and count against your storage.
- Find the heavy messages. Select a mailbox, choose View > Sort by > Size, and delete the large ones you no longer need.
- For messages worth keeping, save the attachments to a folder, then select the messages and choose Message > Remove Attachments. The text stays, the bulk goes.
- Stop the problem at the source: in Mail > Settings > Accounts, select each account, and under Account Information set Download Attachments to Recent or None.
- For a purely IMAP or Exchange account that has ballooned, you can remove the account in Mail > Settings > Accounts and add it back. Mail deletes the local copy and re-syncs from the server. Never do this for POP accounts or On My Mac mailboxes.
- Empty the Trash mailboxes one more time, then quit and reopen Mail so it can compact its database.
Remove Attachments is permanent on IMAP and Exchange accounts: Mail strips the attachment from the server copy too, not just your Mac. Save anything you want before using it.
Will it come back?
Yes, as long as you receive email. IMAP and Exchange accounts mirror whatever lives on the server, so if you delete local copies but leave the mail on the server, Mail downloads it all again. The lasting fixes are server-side: archive or delete old mail in the account itself, and keep Download Attachments set to Recent or None so new attachments stop piling up on disk. POP mail and On My Mac mailboxes only grow when you add to them, since nothing re-syncs those.
Common questions
I deleted thousands of emails but Mail still shows huge storage. Why?
Deleted messages move to each account's Trash mailbox and stay on disk until erased. Choose Mailbox > Erase Deleted Items > In All Accounts. The storage figure in System Settings can also lag behind by a while, so check du -sh ~/Library/Mail for the real number.
If I delete ~/Library/Mail, will my email come back?
Only for IMAP and Exchange accounts, which re-download everything from the server. That can take hours and hammers your network. POP mail and On My Mac mailboxes exist only in this folder and will not come back. Don't test this without a current backup.
Can I move ~/Library/Mail to an external drive?
Mail expects the folder at its standard path, and symlinking it out is fragile across macOS updates. A better approach: select an old mailbox, choose Mailbox > Export Mailbox to save an .mbox archive on the external drive, then delete those messages in Mail.
What is the MailData folder inside it?
It holds the Envelope Index, the database Mail uses for search and message lists. It shrinks and rebuilds on its own. Deleting it forces Mail to re-index every message at next launch, which is slow and rarely worth it.
Related folders
- Messages Taking Up Space on Your Mac: Can You Delete ~/Library/Messages?
- Photos Library Taking Up Space on Your Mac: Can You Delete It?
- Is It Safe to Delete Old iPhone Backups on Your Mac?
- Should You Empty the Downloads Folder on Your Mac?
- Mobile Documents Folder Huge on Your Mac? Don't Delete It Directly
- Your Mac's Library Folder Is Huge. Can You Delete It?