If you are a Linux user and if there are lots of emails on root mailbox. This article will help you to remove all emails from root mailbox.
In this article I will show how you can remove all root user emails using command line. I will provide you two methods to remove user emails in Linux system using single command.
Using below command you can simply delete all emails of root user or any other user on Linux system.
# echo 'd *' | mail -N
Using second method you can empty the root mailbox file or any user mailbox file. Follow the below command to empty the root mailbox file.
# cp /dev/null /var/spool/mail/root Alternatively # > /var/spool/mail/root
If you want to delete other users mailbox just replace the root user with other username.