I am using Thunderbird + IMAP. Thunderbird caches messages locally in:


For each IMAP folder, there are files Folder and Folder.msf.

I have noticed, when I delete an email with large attachment, and then delete it from Trash also, than the trash file .icedove/asdfgh.default/ImapMail/mail.example.com/Trash still contains the email (and the attachment). Thus, even though from within Thunderbird it looks as if the message has been deleted (or expunged from trash, or what ever the term is), the message data is still in the trash file (I can see it when I open the Trash file with my text editor)

Can anybody please explain what is happening here? How can I really delete an email?

And I should add that the email has been successfully deleted on the IMAP server. So, Thunderbird has deleted the email on the server, but for some reason still keeps the data in the file.

  • does the thunderbird trash directory get cleared after the app restarts?
    – fduff
    Commented Jul 13, 2014 at 20:47
  • @fduff - it stays there even after Thunderbird restart. Commented Jul 13, 2014 at 20:52

2 Answers 2


Its similar to how the data in a rm'd file will still be there until the disk space is reused. Thunderbird marks it free, but doesn't actually free it (which could involve moving later messages in the file, etc.).

The way to make it actually free it is to compact the folder. Right-click the trash and select 'Compact'. That should do it. You can also select 'Compact Folders' under the File menu to do all folders.

  • 1
    thanks, that worked. I have also found where you can set it to be done automatically: Options -> Advanced -> Network & Disk Space -> "Compact folders when it will save over X MB" Commented Jul 21, 2014 at 6:00

I have just tried it on my system with Gmail, and found I have the same problem. A not so practical way to have it clean is to right-click the folder, select Properties, and then click on Repair folder.

One thing I found interesting is that .icedove/asdfgh.default/ImapMail/mail.example.com/Trash was deleted and didn't appear anymore, even after opening a few emails, attachments, and restarting Thunderbird.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .