Delete all mailbox mail from command line

 
Written By Sanjir Habib On Dec-21st, 2017

When your crontab generates some output, that output is sent as mail to your linux mailbox.

And displays a message like this

You have new mail in /var/mail/habib

To read the mail. Type “mail”.
“p” for printing the body.
And “n” for next mail.

$ mail
? p
? n

To empty your mailbox

? delete *
? q