HostOnNet Blog

Delete all mails using mailx/mail

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