198

Any idea why my Mac terminal says:

You have mail in /var/mail/lofye

How can I make it stop saying that every time I open terminal?

quack quixote
  • 42,640
lo_fye
  • 2,321

8 Answers8

196

Somehow you've had a script or something similar deliver mail to your account on your local machine which is stored in /var/mail/$USER

You can either remove the file /var/mail/$USER which will remove the alert that you have mail (as it will alert you if that folder is present and/or has unread messages) or you can use mail to read the messages before deleting them.

Chealion
  • 25,777
55

Type mail to view the mail. I believe d deletes it.

smottt
  • 103
Gren
  • 1,234
  • 3
    When using mailx d* will delete everything. Mail itself won't. – BinaryMisfit Aug 19 '09 at 15:46
  • 8
    Doing mail and then d * removed all mails for me on Mac OS X. – yagooar Nov 13 '14 at 13:11
  • 2
    See https://apple.stackexchange.com/questions/28745/how-do-i-delete-all-terminal-mail to delete all messages. – Shaun Dychko Sep 24 '20 at 18:43
  • 5
    This answer did not work for me. Thanks to @ShaunDychko's link, I found the reason: Make sure do to exit with q after the d * command, only that saves the changes to disk. – not2savvy Mar 08 '22 at 21:36