Stop Thunderbird from littering your desktop with attachments

I love Thunderbird. It is both flexible, powerful and user-friendly. But, on Mac OS X, it has the nasty habit of saving a copy of all the opened attachments on the desktop leaving a messy trail… Can something be done about that ? You bet !

I said Thunderbird was flexible, didn’t I ? It is so flexible that it will let you edit tons of hidden parameters if you so wish. Those parameters can be found in the “Thunderbird” menu under the “Preferences” item. In the preferences window go to “Advanced”, then “General” and then “Configuration editor”. Be sure to read the warning that will appear and don’t do anything stupid…

Now for the grand finale, in the about:config window that appeared, control-click (or right-click) anywhere and select “New” and “Boolean value” from the contextual menu that appeared. Then, paste in the following key name browser.helperApps.deleteTempFileOnExit and select true when prompted. Voilà! Now, all those temporary files will be cleaned up when you exit Thunderbird.

This has been tested to work in Thunderbird version 3 through 24.

Update : As pointed out by Loes in the comments below, it is also possible to have Thunderbird save the temporary files to another less intrusive location. Check out the original post titled Thunderbird 3 Litters Desktop on OS X for more information.


    1. Thanks for the link Loes. I updated my post to include this link since it will probably help most people coming to this page.

  1. This is definitely the nerdiest thing I have done on my computer. Having just read The Millenium trilogy I felt all ‘WASP-ish’ too. Thanks!

  2. Genius……………….That was so easy!!!!!
    I have been bugged by this for ages, and ages…….

  3. Thanks for this tip – worked a treat. This is something that’s been driving me up the wall since I started using Thunderbird so it’s good to get it sorted at last.

  4. Thanks for the tip. You wonder though, why does Thunderbird do this in the first place, and why doesn’t Thunderbird allow a direct setting for this?

  5. As others have said, thank you! That was driving me mad. It’s an annoying aspect of the programme.

  6. fanx, had to move away from my beloved e-mail prog sweetmail (made my day from OS 8.6, till 10.5.8)
    but it doesn´t support ssl.
    i stumbled into thunderbird, its ok, but lots of things are…stupid.
    like this (littering), your solution works.
    please give us more…. about.configs………
    best regards
    p.s. power to ppc

  7. I wonder why they didn’t just add that option to tick off, beneath the option of a different location – my dad just got a new macbook, i tried to convince him for weeks, he hated the apple mail and was furious, u know how dads are right, so he started hating thunderbird cauz he can’t see his palm trees of his wallpaper anymore but a lot of files only. thx this helped me a lot and i even used it on my thunderbird too cauz i actually didn’t like it too but it takes a lot of time to fill out the desktop of your 27″ iMac so u know…

  8. Thank you Jean-Philippe! This was driving me nuts. Thank you for your generosity. Perhaps a distinguishing characteristic of a “right-wing leftist”?

  9. Thanks Jean-Phillipe.

    Just a note here… this works perfectly on exit of Thunderbird…

    It caught be off guard when I first tried because the file stayed on teh desktop when I closed Preview. So just to clarify, you need to quit Thunderbird for the file cleanup to occur 🙂


  10. thunderbird 31.7.0 I don’t see this option and not so long ago from 2014 posts! Weird thing is that I’ve been using thunderbird for 10+ years and never had this issue – but at some point the “upgrade” created this messy nightmare. Please help …

  11. Wow, I have been using this for years. Suffering with crowded desktops with 20 files to clean up every day. Worked perfectly and exactly what you discribed. thanks for your help

  12. Thanks a LOT for this tip. I’m so happy to see that this is possible. There’s no need to hope for quicklook support.

    This issue was bothering me for the many years I’ve used ThunderBird on and off. To completely clear my desktop of any of the problem, I went to the ‘Attachments’ page in the Preferences and changed where files are saved to since this is also where copies of opened attachments are placed. This new location will remain in effect even if you switch to using the ‘Always ask me where to save files’ option.

  13. Works on Mac OS X 10.9.5 running Thunderbird 38.3
    Additionally, under preferences-attachments-incoming, I created a “temp” folder for the files to save to that isn’t the desktop. I have found that whatever your “save files to” destination is, this is where they will appear even when “always ask” is selected.

    After running this boolean, the files automatically delete from that new temp folder destination I created. Still wish Mozilla fixed this on their end though!

    1. After adding the boolean, and creating a ‘temp’ folder, the files are now redirecting to the temp folder and no longer saving to my desktop. I was only having difficulty with .pdf files as all others were set to ‘always ask me where to save files’. The problem is .pdf is not listed as an option under Attachments/Incoming.

      So while my .pdf files are no longer saving to my desktop, they are not deleting from the temp folder I created when TB closes. Different location, same problem. Fixes???

  14. One can have the files saved in another location other than desktop.
    Open Preferences -> Attachments Tab -> Save Files to: ( Select where you want files to go. )
    If one wishs to point to the /tmp folder: In the finder window press (shift+command+G) and explicitly input “/tmp”.
    This way one will not need to close and re-open TB to clear the desktop. Though one may still want the temp files removed on closing TB, in that case keep the option described in this article as well.

      1. Hi,
        I think i am doing something wrong ..

        The attachments are still saving on my desktop..

        Please help

  15. Alternatively, set browser.helperApps.deleteTempFileOnExit to False, and configure where copies of opened attachments are created: Thunderbird -> Preferences -> Attachments -> Incoming -> Save files to…
    I have a Thunderbird Attachments folder on my desktop and purge it regularly. At the same time I get to move elsewhere the files I want to keep.

  16. Does not work form me. My Desktop is still full of files. I need to delete manually. Very frustrating. Mozilla needs to fix this.

  17. Didn’t work for me I opened file still popped up and then when I closed it still stayed there

  18. Thanks, This tip Worked for me.
    But, as mentioned in some posts, it still leaves the attachments in the desktop until you quit (not close) thunderbird. A work around is to create a temp folder by any name that you like, and then go to Thunderbird -> Preferences -> Attachments -> Incoming -> Save files to “that folder”. So, it doesnt litter your desktop when thunderbird is still open, but will save it in that temporary folder until you quit thunderbird, thus, not littering your desktop at all times.

  19. This has been bugging me for years and I’m so happy to have finally figured it out, thanks to you guys! It worked for me, thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *