HostOnNet Blog

Delete all mails using mailx/mail

Looking for Linux Server Admin or WordPress Expert? We can help.

To delete all mails using mailx/mail on centos, run

echo 'd *' | mail -N

For example

[root@server1 ~]# echo 'd *' | mail -N
[root@server1 ~]# mail
No mail for root
[root@server1 ~]#

Posted in CentOS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.