How to Clear the Mail Cache on a Mac in 2026, Safely
Mail on your Mac slow, stuck or eating disk space? Clear its cache the safe way: rebuild mailboxes, trim attachments and erase deleted mail. No cleaner apps.
To clear the Mail cache on a Mac, use Mailbox > Rebuild, Apple's built-in way to throw away a mailbox's local copy and download it again from the server. To free disk space, change Download Attachments to Recent or None, remove attachments you've saved elsewhere, and choose Mailbox > Erase Deleted Items. You don't need a cleaner app.
Mail has a way of getting heavy without telling you. A search that used to be instant starts missing things, a message opens as a blank pane, or System Settings tells you the disk is nearly full and you have no idea why. Mail keeps a local copy of your mail and attachments, so it's a fair suspect. This guide covers what that "cache" really is, the fixes Apple documents for clearing it, how to win back space without losing anything, and the moves I'd steer clear of.
What is the Mail cache on a Mac?
There's no single cache file in Apple Mail and no "clear cache" button. What people call the Mail cache is the local copy Mail keeps on your Mac: downloaded messages, the attachments that came with them, and the index Mail uses to list and search them. All of it lives inside the Library folder in your home folder, which Apple's attachment settings page confirms is where Mail saves attachments it downloads.
For accounts that live on a server, such as iCloud, Gmail, Microsoft 365 and most work accounts (IMAP or Exchange), that local copy is a mirror. The real mail is on the server, and Mail can fetch it again. For POP accounts and anything filed under On My Mac, the copy on your Mac may be the only one. That difference decides which steps below are safe for you, so it's worth knowing which kind you have before you start.
To check, open Mail > Settings (Command-Comma), and click Accounts. The list shows each account's type under its name, such as iCloud, Google, Exchange, IMAP or POP. Before I clean anything in Mail, I glance down that list first. A Google or iCloud label means a mistake can be undone by downloading again; a POP label means it can't.
When clearing the cache helps, and when it doesn't
Clearing or rebuilding Mail's local data fixes problems with the copy on your Mac, not problems with your account or the server. Use the table to match what you're seeing to the step most likely to help.
The problem | What's behind it | Start with |
|---|---|---|
Messages missing, garbled or blank in one mailbox | The local copy of that mailbox is out of step | Rebuild the mailbox |
Search misses messages you know are there, even with Entire Message search | The mailbox's message list needs refreshing | Rebuild the mailbox |
Your Mac's disk is filling up | Downloaded attachments and old mail | Download Attachments setting, Remove Attachments |
Your provider says the mailbox is full | Mail stored on the server | Erase Deleted Items, delete or move large messages |
Password prompts or "can't connect" errors | Account or server settings | Not a cache problem; see the connection guide |
Apple recommends a rebuild when messages "seem missing or garbled" or when an Entire Message search doesn't find what it should, per its mailbox guide. If Mail can't reach the server at all, a rebuild won't help, and it can leave you staring at an empty mailbox. Fix the connection first with our guide to Mac Mail not connecting to the server.
How to clear the Mail cache by rebuilding a mailbox
Rebuilding a mailbox is the safe, Apple-supported way to clear Mail's cache for that mailbox. For IMAP and Exchange accounts, Apple's rebuild page explains that Mail deletes the messages and attachments stored on your Mac and downloads them again from the server. Until that download is done, the mailbox appears empty.
- Make sure you're online and Mail shows the account as connected (no warning icon beside it in the sidebar).
- Click the mailbox that's misbehaving, such as Inbox, in Mail's sidebar.
- Choose Mailbox > Rebuild from the menu bar.
- Leave Mail open while it downloads. The mailbox may look empty for a while; that's expected.
- Once the messages are back, check the problem again before rebuilding anything else.
Rebuild only the mailbox causing trouble, then see if that was enough. A rebuild of a large Inbox on a slow connection can take a long while. I once started one on hotel Wi-Fi and watched an empty Inbox for far longer than I was comfortable with. Now I only rebuild on a connection I trust, with the Mac plugged in.
Back up mail that lives only on your Mac
Apple's description of the re-download applies to IMAP and Exchange accounts, and it doesn't say what a rebuild does to mail stored only on your Mac. If you use a POP account or keep mail in On My Mac mailboxes, those messages may exist nowhere else, so make sure Time Machine has a recent backup before you rebuild them. Apple's storage guide notes that Time Machine can restore content Mail downloaded.
If Mail quits or freezes while a rebuild is running, our guide to Mac Mail crashing walks through what to do next.
How to see how much space Mail is using
Mail can show you how much server storage each account and mailbox uses. Apple's storage guide points to Get Account Info, which you reach by Control-clicking an inbox.
- Control-click (or right-click) an account's Inbox in Mail's mailbox list.
- Choose Get Account Info.
- Look at the storage figures to see how much of your provider's quota is used and which mailboxes take the most.
For the space Mail takes on your Mac's own disk, open Apple menu > System Settings, click General, then Storage, per Apple's storage article. Mail isn't among the categories Apple lists there with management options, so if you want a single number, you can check the Mail folder's size in the Finder: choose Go > Go to Folder, type ~/Library/Mail, select the Mail folder and choose File > Get Info. Look, but don't move or delete anything in there. Apple warns in its mailbox guide that changes made in the Finder may not show up in Mail.
How to stop Mail downloading every attachment
The quickest way to keep Mail from filling your disk is to stop it downloading every attachment. In Mail > Settings > Accounts > Account Information, the Download Attachments menu offers All, Recent or None, according to Apple's Account Information page.
- Open Mail > Settings and click Accounts.
- Select the account, then click Account Information.
- Open the Download Attachments menu and choose Recent (attachments from the past 15 months) or None.
- Repeat for each account and close the window.
There's a catch worth knowing. Apple says images, PDFs, video and audio are always downloaded, whatever you pick, so the setting only affects other files such as spreadsheets and zip archives. Attachments Mail skips stay on the server with their messages.
On my laptop I keep this on Recent. Old spreadsheets from finished projects don't need to sit on a small drive, and the rare time I need one, it's still in the email on the server.
macOS can also help on its own. In System Settings > General > Storage, the Optimize Storage recommendation can keep only recent email attachments on the Mac when space is needed, per Apple's optimize storage guide.
How to remove attachments from emails in Mac Mail
To strip an attachment out of an email but keep the message, select it and choose Message > Remove Attachments. Apple's attachment guide says the message stays in the mailbox with a note that its attachments were removed.
On IMAP accounts this deletes the file for good
For IMAP accounts, Apple says removed attachments are also deleted from the mail server and can't be retrieved. Save anything you want to keep first. Mail doesn't delete attachments you've saved.
- In the message list, choose View > Sort By > Size so the biggest emails rise to the top.
- Select a message with a large attachment you no longer need inside the email.
- If you want the file, hover over the header, click the attachment button and choose Save All, or choose File > Save Attachments.
- Choose Message > Remove Attachments.
Before I strip a long work thread, I save the signed contract or final deck into the project folder first, then remove it from the email. The conversation stays searchable, and the file lives somewhere I'll actually look for it.
There's also a temporary folder for attachments you open. In Mail > Settings > General, Remove unedited downloads decides when Mail deletes the copies it keeps in its Mail Downloads folder. By default, per Apple's General settings page, an attachment you haven't edited or saved is deleted when you delete the message it came with. That default is sensible, and I've never needed to change it.
If attachments are the problem in the other direction (a paperclip with no file), see Apple Mail not showing attachments.
How to erase deleted and junk mail in Mac Mail
Deleted messages keep taking up space until they're erased. Apple's storage guide says recently deleted messages stay on the server until you choose Mailbox > Erase Deleted Items, and Apple's free-up-storage article adds Mailbox > Erase Junk Mail.
- Check Trash and Junk for anything you meant to keep, and drag it to another mailbox.
- Choose Mailbox > Erase Deleted Items, then pick all accounts or a single account.
- Choose Mailbox > Erase Junk Mail.
Erased means gone
Erase Deleted Items permanently deletes what's in Trash. Look through it first; once it's erased, only a backup can bring it back.
To make this automatic, open Mail > Settings > Accounts, select the account, click Mailbox Behaviors and set Erase deleted messages to the interval you want. Apple also lets you choose whether deleted mail goes to a Trash mailbox at all; keep a Trash mailbox selected, or deleted messages are removed without a second chance.
For a POP account, Apple suggests shortening how long copies stay on the server: Mail > Settings > Accounts > Advanced, then the Remove copy from server after retrieving a message menu.
Should you delete Mail's cache folders by hand?
No, not as a first step. Some guides tell you to open Mail's folders in your Library and drag their contents to the Trash. Apple's Mail User Guide doesn't document that, and the things it does document, Rebuild, Remove Attachments and Erase Deleted Items, cover what those manual steps are trying to do, from inside Mail, where Mail keeps track of the changes.
The risk isn't theoretical. Your Library holds the mail itself, not only throwaway data, and Apple's mailbox guide notes that changes made in the Finder may not show up in Mail. If you've worked through everything here and Mail is still broken, the next step is Apple Support, with a current Time Machine backup in hand.
The same goes for cleaner apps. You don't need one to manage Mail. Every step in this guide is built into Mail or macOS and free.
How to keep Mail from bloating again
- Keep Download Attachments on Recent for accounts you don't need fully offline.
- Set Erase deleted messages to a schedule you're comfortable with, so Trash doesn't grow forever.
- Archive instead of hoarding everything in the Inbox; archived messages stay searchable, and this archiving walkthrough shows where they end up.
- Save attachments you care about to a folder, then remove them from old threads.
- Clean up on the server for big accounts. For Gmail, the mass delete guide shows the searches that clear years of mail, and Mail picks up the change when it syncs.
- Leave Time Machine running, so a rebuild or an erase is never the last copy of something.
When my provider warns that the mailbox is nearly full, I start with Get Account Info, then sort the biggest mailbox by size. It's nearly always a handful of old messages with big attachments, not years of text.
Tidy the Gmail account behind Mail
Much of Mail's weight on a Mac mirrors what's on the server, so trimming the account itself is the lasting fix. With Gmail connected to Merlin's Mac app, you can describe the cleanup in chat, such as "find last year's shipping notifications and move them to Trash". Merlin shows the matching emails on cards, and nothing moves until you approve. Emptying Trash is still done by you, in Gmail.
Get MerlinFrequently asked questions
Does clearing the Mail cache delete my emails?
For IMAP and Exchange accounts, rebuilding a mailbox removes the local copy and downloads it again from the server, which brings the mail back. Mail in POP accounts or On My Mac mailboxes may exist only on your Mac, so back it up before rebuilding.
How do I clear the Mail cache on my Mac?
Click the mailbox that's acting up, then choose Mailbox > Rebuild. Mail discards the local copy of a server-based mailbox and downloads it again.
Why is Mail taking up so much space on my Mac?
Mail keeps a local copy of your messages and attachments. Set Download Attachments to Recent or None in Mail > Settings > Accounts > Account Information, and remove attachments you've saved elsewhere.
How long does it take to rebuild a mailbox in Mac Mail?
It depends on the mailbox size and your connection. Expect an empty-looking mailbox while Mail downloads everything again, and keep Mail open and the Mac online until it's done.
Does Remove Attachments delete files from the server?
Yes, for IMAP accounts. Apple says removed attachments are also deleted from the mail server and can't be retrieved, so save them first.
Do I need a cleaner app to clear Mac Mail?
No. Rebuild, Remove Attachments, Erase Deleted Items and the Download Attachments setting are all built into Mail and free, and they're the steps Apple documents.