Is it safe to delete ~/Library/Mail on Mac?
Do not delete~/Library/Mail
~/Library/Mail holds your email, attachments and Mail settings. What downloads again, what is lost for good, and the safe ways to make Mail smaller.
Verdict: Do not delete. ~/Library/Mail is where Apple Mail keeps its copies of your messages, the attachments it has downloaded and its own settings, so deleting the folder or anything inside it can lose email for good. To make Mail smaller, remove large attachments and old messages inside the Mail app instead.
What lives in ~/Library/Mail
Mail stores everything for every account you have added in this one folder, sorted into a version-numbered folder and long account identifiers:
- Mailboxes for each account. For iCloud, Gmail, Exchange and other IMAP accounts these are local copies of what is on the server, including attachments Mail has downloaded.
- On My Mac mailboxes and POP accounts. Messages you filed in On My Mac, and mail from POP accounts set to remove copies from the server, exist only here.
- Mail's own data. Rules, signatures and the information Mail uses to search and sort your mail sit alongside the mailboxes.
Mail chooses the folder names and changes them between macOS versions, which is one more reason not to edit anything there by hand.
What happens if you delete it
- Server-based accounts keep their mail on the server, so Mail would download it again. With a large mailbox that can take hours, and settings stored only on this Mac, such as rules and signatures, would be gone.
- On My Mac mailboxes and POP mail have no other copy. Deleting them loses those messages permanently.
- Removing parts of the folder while Mail is open can leave it with mailboxes that look empty or messages that won't open.
None of this is a cache that quietly rebuilds. Treat it as personal data.
How to check its size safely
From Terminal:
du -sh ~/Library/Mail
This only reads. macOS keeps Mail private, so it prints "Operation not permitted" unless Terminal has Full Disk Access (System Settings > Privacy & Security > Full Disk Access). Switch that off again when you have finished.
Inside Mail you can see where the space goes without any special access:
- Choose View > Sort By > Size to bring the largest messages to the top of a mailbox.
- Control-click an inbox in the sidebar and choose Get Account Info to see how much each mailbox uses on the server.
The safest way to get the space back
Apple's Delete emails and manage storage in Mail on Mac covers each of these:
- Delete or move the biggest messages. Sort by size, then delete the ones you don't need or move them to another mailbox.
- Remove attachments you have saved elsewhere. Select a message and choose Message > Remove Attachments. The message stays, marked to show its attachments were removed.
- Erase deleted messages. Choose Mailbox > Erase Deleted Items, then an account. To make it automatic, go to Mail > Settings > Accounts, select the account, click Mailbox Behaviours and set Erase deleted messages.
- Let macOS keep fewer attachments. In Apple menu > System Settings > General > Storage, the Optimise Storage recommendation keeps only recent email attachments on the Mac when space is needed.
- Remove accounts you no longer use in System Settings > Internet Accounts. Mail stops keeping copies of their mail.
Warning: Apple's View, save or delete email attachments in Mail on Mac points out that for IMAP accounts, removing attachments also deletes them from the mail server, and they can't be recovered. Save anything you want first: Mail saves attachments to your Downloads folder unless you chose another one. Removing a POP account also removes any mail that exists only on this Mac, so export those mailboxes first with Mailbox > Export Mailbox.
What never to touch
- The
Mailfolder itself, its version folder or any account folder inside it. - Individual
.mboxfolders. Drag them out and Mail loses track of them; export mailboxes from Mail instead. rmon anything under~/Library/Mail. It skips the Bin and cannot be undone.- Cleaner apps that offer to wipe Mail's downloads wholesale. Use Remove Attachments, where you can see what goes.
Messages stores files the same way; see is it safe to delete Messages attachments. Attachments you save end up in your Downloads folder, and iCloud Drive has its own synced rules. The complete guide to freeing up space on a Mac covers the rest.
How Headroom helps
Headroom never changes anything in ~/Library/Mail. It is on Headroom's list of protected places, checked again right before every change, whatever a scan finds. Once you allow Full Disk Access, the free Space map shows how big Mail has grown, labelled "Mail and attachments"; before that, Mail is counted in the "macOS and locked folders" block. Trim Mail in Mail itself, then let the cleaner clear caches and build folders. Download Headroom: the scan is free, and the $19 one-time licence clears what you tick on up to three Macs.
Questions
Can I delete the Mail folder in Library on Mac?
No. It holds Mail's copies of your messages and its settings. Mail kept only on your Mac, such as On My Mac mailboxes and POP mail removed from the server, would be lost for good.
How do I make Apple Mail use less space?
Sort by size with View > Sort By > Size, delete or move large messages, use Message > Remove Attachments, and erase deleted items with Mailbox > Erase Deleted Items.
Does removing attachments in Mail delete them from the server?
For IMAP accounts, yes, and Apple says they can't be recovered. Save any attachment you want to keep before you remove it.
Where does Mail save attachments I open or save?
To the Downloads folder by default. You can choose a different folder in Mail > Settings > General.