How to delete mails?

Hello,
sorry for that really dump question. I know it should be solved easily by reading the documentation, but just can not figure it out.
I have some mails in the mailbox of my root account and I`d like to delete them.
The help, as well as the man-page, of the "mail"-utility says mails can be deleted with
Code:
d <message list>
But what do I have to insert as <message list>?
The help says it consists of integers, ranges of same or user names...
This doesn`t really help me, since I still don`t know what to enter...

Any hints for me? :)

Thanks,
Nokobon
 
Type h to see a list of messages. The numbers in front are the ones you need to put after d.

It's probably simpler to install mail/mutt or mail/pine4.
 
Code:
   Specifying Messages
     Commands such as print and delete can be given a list of message numbers
     as arguments to apply to a number of messages at once.  Thus ``delete 1
     2'' deletes messages 1 and 2, while ``delete 1-5'' deletes messages 1
     through 5.  The special name `*' addresses all messages, and `$'
     addresses the last message; thus the command top which prints the first
     few lines of a message could be used in ``top *'' to print the first few
     lines of all messages.
 
Thank you very much!
@DutchDaemon:
Where did you get that documentation from?
It`s much better than the man-page...
 
DutchDaemon said:
Uhmm, from the man page .. mail(1).

D'oh!
That's embarassing... xD
I only read the "delete"-part.

By the way...after restarting the mail-programm, the deleted mails are there again.
Why?
I want to delete them constantly.
 
If you plan on doing a lot of command-line mail reading, I advise you to get a console-based mail program, as suggested above, e.g . mail/alpine or mail/mutt, or have your email forwarded to a place where you have POP3/IMAP/webmail access, of course.
 
Another dirty shortcut w/o typing much is
Code:
>$MAIL
OR
Code:
>/var/mail/$USER
Above two are bash specific, csh:
Code:
echo > $MAIL
 
Back
Top