Mutt – delete messages by date range
- April 23rd, 2013
- Posted in Documentation
- Write comment
Finally got fed up when faced with how to delete 9,000 of 10,000+ email message using mutt in linux. The key is to get the messages tagged. To tag messages, hit “T” (capital T). Then, you will be presented a “Tag messages matching:” prompt.
Tag the messages by date:
Tag messages matching: ~d dd/mm/yyyy–dd/mm/yyyy
For example:
Tag messages matching: ~d 01/01/2012-31/12/2012
Tagged messages will now have an “*” (asterik).
Delete all the tagged messages:
Hit the “;” (semi-colon). You will have a “tag-” prompt. Then, just hit “d”.
You’re my hero. Thanks!
You can also hit D then ~d dd/mm/yyyy-dd/mm/yyyy then enter and the same will happen without the necessity of tagging first. You can also delete just a single day by omitting the second part of the range
Funny to see your comment now. I have actually been using that for a while very recently. I just haven’t added to the post. Thanks for the info. I love the how powerful and fast mutt is.
Thanks, that was helpful!
Thanks, you just saved me an hour of googling….