How to remove all of the mails for a user account on your system

Have you ever tried to type “mail” at comment prompt? Command line tool mail uses for reading system mail messages on your system. However if your system is running as a webserver than user account www-data probably has got many messages. If you want to remove all of the mails for user www-data just go to:

cd /var/mail/
ls -l

Make sure that file www-data is listed.

Now you can safely remove that file by typing:

rm www-data