3

The delete-by-pattern is the D command. But how can I specify a range, say from message number 1234 through 2345? Using D with something like 1234-2345 obviously fails because it treats it as a pattern, not a range of message numbers.

2 Answers 2

14

This was very helpful, but still wasn't quite obvious to a complete newbie like me. In gory detail...

  • Type "D"
  • mutt responds with "Delete messages matching:"
  • Type a response following the pattern: "~m 1234-2345" (no quotes)
2
  • 1
    This doesn't add anything to the accepted answer...
    – jasonwryan
    Nov 28, 2016 at 2:53
  • 3
    I will grant that it's merely a combination of the question and the accepted answer; however, it connects the dots, so you don't have to, and that's apparently valuable to several voters. It's exactly the correct procedure in 3 bullet points. Mar 7, 2018 at 23:01
4

Use the ~m pattern.

~m 1234-2345

You would need to use ~m even to delete a single message by its number (or, of course, you could move to it and use d).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.