If you have a bunch of emails stuck on your Linux server for the root user, here’s an easy process to remove the root user’s email from the system. Please use caution when doing this… you could break things if you’re not careful.
First, see how many messages you have: mail (This will display how many messages you have).
Press q to quit the mail application: q From the command line.
You’ll next want to go to the location of the mail spool: cd /var/spool/mail/ First, rename / backup the file: cp root root_bak.
Remove the root mail file: rm root Answer Y at the prompt: Y.
Then, you’ll need to recreate the file: touch root Type in mail again to see how many messages you have: mail.
Please use caution when doing this… you could break things if you’re not careful.