Riaan's SysAdmin Blog

My tips, howtos, gotchas, snippets and stuff. Use at your own risk!

EmailLinux

Mutt Mass Delete

From time to time I still use mutt to check or delete mail. For instance where I only have terminal access to a root account and something caused the account to collect thousands of e-mail.  Here is how to delete a lot of mutt e-mail.

In the main screen press D (shift + d)
Delete messages matching: ~s .*

~s will search the subject for the given expression and ".*" is a global regex wild card

All messages will now be marked for deletion.  Press q and y to confirm.

admin

Bio Info for Riaan