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?
Super User is a question and answer site for computer enthusiasts and power users. It only takes a minute to sign up.
Sign up to join this communityAny 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?
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.
Type mail
to view the mail. I believe d
deletes it.
There are several ways to remove it. The simplest is:
> /var/mail/<whatever_user>
You need to include the '>'
I'm willing to bet it's because there are files in that folder.
Have you actually looked at the contents of the folder? If there is something in there, it will more than likely give you an idea of what caused it, and how to prevent it in the future.
From the terminal:
cd /var/mail/lofye
ls
If you don't have mail, you won't see the message (there's not even a folder for my username under mail on my mac).
/var/mail
is a directory, and loyfe
is the file within it. To view the file, one could less /var/mail/loyfe
.
– Thomas Hunter
Jun 21 '13 at 13:56
Open mail
and then put in d *
and press Enter. The d
command means delete
and the *
selects all mails in the list.
If your running ClamAV for Mac this is a known issue. The system mails you after each update and scheduled scan.
I was able to just create a .hushlogin and I've a clean Terminal now.
$ touch .hushlogin