How can I delete Mail.app's cached e-mails that are saved to disk in OS X Lion?

I am running out of some disk space, and noticed Mail has about 30GB of emails stored.

What is the best way to delete these emails? I don't need them as a server has a copy.


Solution 1:

Go to Mail -> Preferences -> Accounts

  1. Choose the mail account
  2. Choose the advanced tab
  3. Change the status of "Keep Copies of message for offline viewing" to "Don't keep..."

Apples's documentation does not say what happens when you change the status, but goes on to state:

It’s recommended to use the default selection (“All messages and their attachments”) so you can search entire messages. Additionally, keeping copies of messages on your computer improves junk mail filtering and includes the messages in Time Machine backups.

Solution 2:

Same thing happened to me. I went to ~/Library/Mail/V2 and deleted everything (actually copied to up to My Documents for later import). That let me open Mail.app. I then deleted the exchange account and create it again.