I use the Ctrl+g keybinding to retrieve mail from my POP mail server. Whenever I do this, Mutt will ask me if I want to delete messages from the server.

If I tell it "no", it will download all of the messages from the server over again, resulting in duplicate messages in my inbox.

If I tell it "yes", it deletes everything from the server.

I need to be able to access my emails on different devices, but I don't want to go through the hassle of downloading every single email over and over again whenever I check my email. Is there any way to get around this?


This answer provides a way to remove/delete duplicate emails in mutt email client. At present I myself still am unaware how to prevent the duplicate email download in the first place. Anyway this is how to at least remove the clutter:

Since the sequence of commands might be not straight-forward, here a recipe list:

  1. Set mutt to display/sort messages according to thread: press o and then select t for thread.
  2. Once in thread mode you can tag(=select/mark) the dupplicate copies of messages via: T and then inputing the pattern =~. As a result all duplicate copies should have a * for displaying them as currently tagged
  3. Now input ;d to mark the duplicates messages deleted. Depending on you configuration the messages will be presented with a D (for deleted) in front of them, or even be gone directly
  4. If set deleted D you still need to purge the messages from the maildir. This purging of the D marked messages can be achieved hitting $ which saves the changes to the maildir file/folder. It will ask you to confirm the deletion of the messages.

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.