Delete cached (offline) email on hard drive in Mail program (El Capitan) How can I delete all cached/offline email from the Mac OS 'Mail' program on my SSD in Mac OS El Capitan? I have 2 Gmail accounts and an Exchange account for work. I'm running out of room on my 256GB SSD, so I need to clear out any/all data that I can. 

I also want to ensure no new mail get stored locally. Basically, I just want the mail accounts to sync to the IMAP/Exchange email servers via the internet and never rely on any local storage. This is a hardwired Mac Mini, so it's never offline. Thanks.
You can find Mail's cached mails in

~/Library/Mail


To see how much space this folder is using, either use Finder's Get Info or

du -hs ~/Library/Mail


To remove the folder and all its contents, either use Finder or

rm -rf ~/Library/Mail




AFAIK, I don't think you can stop Mail from caching received emails from your servers. There used to be an option in Mail preferences that would stop it from caching everything, but I think this was taken out in Mavericks. 

With Mail's behavior as such, it is logical to assume that once these mails are deleted, Mail will re-sync with the necessary servers to cache these mails again.

You might be able to change some things in Mail's preferences, I'll check and edit appropriately.

There's a pretty good guide on Mail and its storage usage over at HowToGeek right here.