How can I delete local mail on mac and stop terminal saying "You have mail." I set up a wayward cron task and accidentally sent a lot of emails to the Mac's local mail server (when opening terminal, it says &quot;You have mail.&quot;), they're all junk and I want to remove them. What is the best way to do so?
I have considered a couple of approaches, but I don't want to risk breaking something. Here are those 2 approaches:

simply deleting the file /var/mail/$USER
This approach:


Go to the Finder, hold down the Option key and click the Go menu. You'll see a Library folder in the list. Click that. (You can only see it when you hold down the Option key.)
Within, there's a Mail folder, then v2, then subfolders for accounts. Your old account folder may be there, although I've always experienced it being deleted when an account is removed.

I'm a little unsure about this because I don't see V2, but instead V8, and I have no idea what those files are:

So I am unsure of what to do. The goal is to safely remove any potential junk from my computer, and stop the &quot;You have mail.&quot; message from appearing when I start the terminal.
Remove /var/mail/$USER. The other option would remove the actual mails you see in Mail.App, this is for sure not what you want.
If you keep getting mails in Terminal, run less /var/mail/$USER to see which processes are sending them.