Home » Blog » Mac OS X » How to Clear Apple Mail Cache on Mac: The Complete, Safe Guide

How to Clear Apple Mail Cache on Mac: The Complete, Safe Guide

  author
Jamie Kaler   Contribution
Rollins Duke
Rollins Duke  Approved By
Published On August 28th, 2026 • 8 min read

If your Mac’s Apple Mail has suddenly become lagging, stuck on search, or silently taking up dozens of disk space, the familiar recommendation is “just clear the cache”. The advice is technically accurate, but fatally imprecise. Mail’s cache resides in several different directories, and one that several people naively suggest you delete is, in fact, your mail database; remove the wrong directory, and you’re at risk of losing your offline copies of messages.

So, what really is the cache in Apple Mail, which folders can you safely delete, and how do you do this, from a two-minute tidying-up in Finder to rebuilding the entire mailbox while keeping your mail intact?

What Apple Mail Cache Actually Is (and Isn’t)

Apple Mail stores the data in three locations on macOS, and it is important to know where and what the data are.

The actual cache is in ~/Library/Containers/com.apple.mail/Data/Library/Caches/ and a corresponding folder under ~/Library/Group Containers/UBF8T346G9.mail/Library/Caches/. This is temporary data that Mail generates when necessary and can always be deleted.

Attachments you’ve downloaded are stored in a different location, mostly in ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads/. These are your downloaded copies of files you’ve previously opened; removing them will save space but won’t remove the original message (Mail will re-download it from the IMAP server whenever you open it, or if it’s on iCloud Mail, it can be removed with the message).

Your mail database is in ~/Library/Mail/V10/ (Each time Apple updates the OS, the number changes – V9, V10, etc). This folder contains your individual mailboxes, the Envelope Index (a database used for search and threading), and offline message bodies. This isn’t “cache” in the traditional sense – it’s more like Mail’s hard drive. It is safe to delete the Envelope Index alone to force a rebuild. However, it’s a bad idea to mass-delete this entire folder unless you keep a backup and are willing to risk losing any messages that aren’t on your mail server (a genuine concern for POP accounts).

Before You Start Clearing Apple Mail Cache on Mac

Take only a few seconds to do these first:

Note: Mail is always writing to these files while it’s running, and if you edit them during operation, you can corrupt your mailbox.

  1. Quit Mail entirely (Cmd+Q).
  2. Determine if you use POP or IMAP. In Mail, choose Settings > Accounts > [account] > Server Settings. If you see a POP account, messages may be stored only on your Mac – back up ~/Library/Mail/ onto an external drive or Time Machine before accessing anything other than the cache folders.
  3. Make a note of your free space (Apple menu > About This Mac > Storage) so you can double-check exactly how much you freed up in the end.

Bonus: Back Up Your Mail Before You Touch the Database

For those who are POP users, or those who want to make the whole process safe before rebuilding the mailbox in Method 3, backing up the live folders isn’t the only game in town. You could always just copy the ~/Library/Mail/ to an external disk, though you’ll end up with a folder of files you can’t read outside of Apple Mail if anything should become corrupted.

A simpler method to achieve a readable, portable backup is a converter such as Apple Mail Converter, which exports your messages directly to a readable format or to any format compatible with the email client you own. With this, you have individual message files that can be opened, searched, or archived separately from Mail without damaging the raw database file.

This should be done just before you rebuild the Envelope Index, and it also provides your POP users with a ready-to-read archive that isn’t merely an exact duplicate of the folder.

Note: It won’t clear the cache or fix search on its own. It can be considered as an approach to backup Apple Mail emails.

Method 1: Clear the Real Cache via Finder (2 Minutes)

This is the safe, low-risk version of what most “clear Mail cache” guides are talking about.

  1. Quit Mail.
  2. In Finder, press Cmd+Shift+G (Go to Folder).
  3. Navigate to ~/Library/Containers/com.apple.mail/Data/Library/Caches/ and hit Return.
  4. Select everything inside and then drag it to Trash (not the Caches folder itself).
  5. Repeat for ~/Library/Group Containers/UBF8T346G9.mail/Library/Caches/.
  6. Empty the Trash and quit Mail. Then restart.
  7. Mail silently rebuilds these caches as needed – no apparent loss of functionality, just less clutter.
Read Related Article | Clearing Apple Mail Cache is one of the approaches to speed up Apple Mail easily.

Method 2: Clear Cache via Terminal (Faster and More Thorough)

If you are familiar with Terminal, this does the same as Method 1 in one step and additionally clears some of the system caches that Finder may have overlooked:

1. Quit Apple Mail.

2. Open Terminal

3. Run


</> Bash

# Quit Mail first
osascript -e 'quit app "Mail"'

4. Clear only cache content.


</> Bash

# Clear Mail's app caches
rm -rf ~/Library/Containers/com.apple.mail/Data/Library/Caches/*

For macOS with Mail group container cache, then also clear:


</> Bash

# Clear Mail's app caches
rm -rf ~/Library/Group\ Containers/UBF8T346G9.mail/Library/Caches/*

5. Restart the Mac afterward.

Ensure the directory is correct before using any rm -rf command. The terminal won’t prompt you for confirmation, and if you mistype and delete the wrong directory, it cannot be recovered from the trash.

Method 3: Rebuild the Mailbox (Fixes Search, Sync, and Slowdowns)

Clearing the cache alone isn’t resolving slowness, search issues, or out-of-sequence errors; the Envelope Index itself has become bloated or corrupted.

Option 1: Use Mail’s built-in rebuild:

  1. Open the Mail application and select the relevant mailbox.
  2. Navigate to Mailbox > Rebuild from the menu bar.

Option 2: Manually delete the index

For each account to fully rebuild:

  1. Quit Mail,
  2. Go to Finder, delete the file ~/Library/Mail/V10/MailData/Envelope Index (check that the V number is correct by opening the folder on your Mac).
  3. Relaunch the mail.

It will reindex all your messages, which might take between a couple of minutes and an hour.

This is not deleting any messages; it just rebuilds the search/index database from the message files that are left.

Method 4: Clean Up Downloaded Attachments Without Losing Emails

Cached items are not the major consumer of Disk space; rather, it is the Attachments. To free up space without deleting Messages:

  • In Mail, Preferences > Accounts > [account] > Account Information, select Recently instead of All.
  • Clear out the old downloads manually: Browse to ~/Library/Containers/com.apple.mail/Data/Library/Mail Downloads/ and remove the files for attachments you’ve saved elsewhere. IMAP accounts will retrieve the original from the server as needed.
  • To see exactly how much space Mail is taking up for a specific cleanup, use Mail’s own storage view, which is located in Settings > General, or on newer versions of OS X in the Apple menu > About This Mac > Storage > Mail. It will give you the information you need and display any large attachments too.

Method 5: Prevent Buildup Going Forward

Clearing the cache is a single fix. These settings are preventing this from ballooning again:

  • Disable auto-download of attached files for the account that you rarely check.
  • Use Mailbox > Erase Deleted Items and Erase Junk Mail from time to time instead of letting them stay in your mailbox forever.
  • If you have several large IMAP accounts, you may want to turn off the option to sync infrequently used mailboxes offline in Account Settings. This prevents Mail from copying every message into your local mail folder.

FAQs

Q) Is it safe to delete the Apple Mail cache?

A) Yes – the files in the Caches folders (Methods 1-2) are temporary and will be rebuilt. The Mail database located in ~/Library/Mail/ is a different case and should be backed up before you begin handling anything other than the Envelope Index.

For more thorough and secure cleanup, the Data Wipe Software would be a great help.

Q) Will clearing the cache remove my emails?

A) No, as long as you only clear the Caches folders and Mail Downloads. The emails are stored in the mail database.

Q) Are you supposed to clear the Apple Mail cache regularly?

A) There’s no set time period; you just do it whenever Mail is running slow or when the ” storage exceeding message shows up.

Q) How come Mail still uses so much storage even after I clear the cache?

A) Usually, the storage is taken up by downloaded emails and attachments, but also by the cache files. Check Apple menu > About This Mac > Storage. For more details: Mac Storage Still Full Even After Deleting Files.

The Bottom Line

In general, the cause of most Apple Mail sluggishness is either a bloated cache or a bloated search index, and the cure is different. Clear out the Apple Mail cache folders themselves for regular maintenance (Method 1 or 2), rebuild the mailbox when the search or synchronization begins to go haywire (Method 3), and then pay some attention to attachments separately as they are generally the greater contributor to the message-size-fatness (Method 4).