Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I set up a cronjob a long time ago that now doesn't exist. Whenever I open up Terminal, it now says "You have mail". I have something like 100 messages that all say the same thing. How do I mass delete all of the messages?

share|improve this question
I wasn't even aware an MTA was built into OS X. Though now that I think about it, frankly I'm not surprised. –  Jason Salaz Oct 21 '11 at 22:48
@JasonSalaz I forgot to ask you, what's an MTA? –  daviesgeek Feb 1 '12 at 2:47
Mail Transfer Agent. When in doubt, Wikipedia. I know of, at least, MTAs, MSAs, MDAs, and MUAs. –  Jason Salaz Feb 1 '12 at 4:27

2 Answers 2

up vote 36 down vote accepted

Launch the Terminal mail app with:

$ mail

You'll see a list of all your messages. Look at the count at the top, it will say the number of messages you have. Say that number is 30. From the mail prompt, do

? delete 1-30
? q

And that should be it. Make sure do to the q after the delete 1-* command, that saves the changes to disk.

share|improve this answer
Awesome! That worked for me. Thanks so much! –  daviesgeek Oct 25 '11 at 6:30

You may also go the direct route and just run : > /var/mail/$USER to empty the mail file.

PS: Deleting the mail file requires sudo, just setting it to empty is enough.

share|improve this answer
Just a tad bit easier to do it Chris's way. ;-) Thanks anyway! –  daviesgeek Oct 25 '11 at 6:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.