Compacting Folders in Mozilla Thunderbird

Delete unwanted messages and free up some space

What to Know

  • Deleted messages aren't truly deleted but rather marked and hidden. Compacting fully deletes them.
  • To compact, select File > Compact Folders. This process may take time if it's been a while since the last compacting.
  • Settings for automatic or periodic compacting: Tools > Settings/Options > Advanced > Network & Disk Space.

Deleting messages in Mozilla Thunderbird doesn't trash them completely; rather, it marks them as deleted and hides them from displaying. This can speed things up, but these messages still consume hard disk space. Compacting is the process of totally deleting these marked messages, clearing space in your inbox. Here's how to compact folders in Mozilla Thunderbird, both manually and automatically via settings.

The instructions here were tested in Thunderbird version 78.11 for macOS, but the processes should look similar in Windows and Linux versions.

How to Compact Folders in Mozilla Thunderbird

Select File > Compact Folders. If your folders are large and you deleted lots of messages since the last compacting, this process may take some time.

Compact folders highlighted in Thunderbird File menu

How to Compact Folders Automatically

You can set up Mozilla Thunderbird to free disk space automatically—with or without prompting. Here's how:

  1. Select Thunderbird > Preferences.

    Thunderbird Preferences highlighted in menu
  2. Scroll down to Compact folders when it will save over_MB, and enter your desired disk space threshold. The default value is 20 MB, which is fine under most circumstances, but if you find Mozilla Thunderbird compacting often, you can increase the trigger to 100 or 200 MB, for example.

    Compacting options in Thunderbird
  3. Choose Close.

Folder Compacting Options and Settings

To compact a folder when prompted, select Compact Now under Do you wish to compact all local and offline folders to save disk space.

To make Mozilla Thunderbird compact without prompting in the future, make sure Always ask me before compacting folders automatically is not checked.

To choose whether you are prompted when Mozilla Thunderbird is about to compact folders automatically:

  1. From the menu bar, select Preferences.

  2. Scroll down to and select Config Editor.

    Config Editor button highlighted in Thunderbird
  3. Click I accept the risk if prompted.

    Thunderbird warning screen
  4. Under Search, type mail.purge.ask.

    Thunderbird about:config
  5. Double-click mail.purge.ask under Preference Name to toggle its setting (visible under Value).

    • False does not prompt you when automatically compacting folders.
    • True asks you before compacting folders automatically.
    mail.purge.ask in Thunderbird about:config
  6. Close the about:config preferences window and select Close.

If you find messages missing or deleted emails appearing after compacting your folders, rebuild or repair their indices.

Was this page helpful?