Deluxe Blog Tips About Projects

How to remove all mails in the Linux terminal

Whenever we run a cron-job or send an email from the terminal in Linux environment, it auto saves an email into the terminal mail box. As time goes, the mail box can be huge and we should remove emails completely.

To remove all mails in the Linux mail box, run these commands:

mail -N
d *
  • The first command list all mails with no summary.
  • The second command simply delete all of them
  • Then quit

That’s all.


Subscribe to the Newsletter

Subscribe to get my latest content by email. I won't send you spam. Unsubscribe at any time.