While running Postfix on an Ubuntu, I have acquired a number of test email in an account usr1, and now I want to delete them before starting other testing. However, every time I try to delete using both d # and 'delete #`, nothing happens.Example:  usr1@usr1:~$ mail  /var/mail/usr1: 5 messages 5 unread  >U   1 usr2              Tue Apr 30 15:54  19/478   Testing local mail  U   2 Mail Delivery Syst Tue Apr 30 15:54  78/2433  Undelivered Mail Returned to SenderU   3 usr2               Tue Apr 30 15:55  19/614   Re: Testing local mailU   4 usr2               Tue Apr 30 15:55  19/604   Re: Testing local mailU   5 Mail Delivery Syst Tue Apr 30 15:55  73/2219  Undelivered Mail Returned to Sender? d 1-5? xusr1@usr1:~$ mail/var/mail/usr1: 5 messages 5 unread>U   1 usr2              Tue Apr 30 15:54  19/478   Testing local mailU   2 Mail Delivery Syst Tue Apr 30 15:54  78/2433  Undelivered Mail Returned to SenderU   3 usr2               Tue Apr 30 15:55  19/614   Re: Testing local mailU   4 usr2               Tue Apr 30 15:55  19/604   Re: Testing local mailU   5 Mail Delivery Syst Tue Apr 30 15:55  73/2219  Undelivered Mail Returned to Sender? xCan anyone explain why this is? Another Unix SE post talks about using the command as I'd expect it to work (granted, in Solaris), but I don't understand why those mails refuse to delete.
Can't delete system email
linux;ubuntu;email;postfix
After much digging, I realized that the problem was that I always exited from mail using either exit or x. From the Ubuntu man page:exit (ex or x) Effects an immediate return to the shell without modifying                the user's system mailbox, his mbox file, or his edit               file in -f.So if you're trying to delete your emails and you use d * or d 1-5, etc, you need to make sure you leave mail using either quit or q.I hope this saves someone else my confusion.