The other day I was in Terminal when I noticed for the first time it said You’ve got mail. at the top. Knowing I didn’t have any new mail I typed mail to see a whole load of system mail from previous web development work. I’m no command line expert so I checked on macrumors.com and quickly found out what to do. Here’s the original post.
Go to the directory (=folder) where the system level email files for all users are stored, and list them:cd /private/var/mail/; ls -l
Display the email(s) for the user which you fill into <username>. Either use your username (without the angle brackets) or use the character * (asterisk) if you want all emails from users listed:cat <username> | less
Finally erase your mail file, in case you do not need it anymore.sudo rm /private/var/mail/<username>
Obviously, seeing as you’re deleting mail from your mac make sure you’re certain before doing so. Also, the sudo rm command has no safety net. Once something’s gone it’s gone so if you’re unsure, don’t do it.