Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Compact not working on local folders (Thunderbird 128.1.0esr)

  • 5 replies
  • 2 have this problem
  • Last reply by jm3

more options

Hi. When I select any of local folders and press the right mouse button on it and then select Compact, nothing happens (any message or pop up). When I choose Imap folder and then select compact, everything works fine even if there is no need of compacting such folder there is a message that 0KB where freed. I choose both online and offline work to check, but nothing helps. I remember that on older versions compacting worked fine, but now I don't know where is the problem.

Thanks for any suggestions.

Hi. When I select any of local folders and press the right mouse button on it and then select Compact, nothing happens (any message or pop up). When I choose Imap folder and then select compact, everything works fine even if there is no need of compacting such folder there is a message that 0KB where freed. I choose both online and offline work to check, but nothing helps. I remember that on older versions compacting worked fine, but now I don't know where is the problem. Thanks for any suggestions.

Chosen solution

Compact can only work if the folder contains emails which are 'marked as deleted'. An email gets 'marked as deleted' if it has been 'moved' to another folder or 'deleted'.

Compact should not be confused with compress (like zipping which does not alter the data). Compact physically removes data that is old and marked to be removed.

The Old_emails_account-2 'Size' in Folder Pane is a total of what is displayed in Message List. The Old_emails_account-2 Size is the actual size of mbox text file in mail account.

Both are the same, this implies, that mbox text file (note - it's not a folder) does not contain any marked as deleted emails. That also seems in line with the message : "Done compacting (Approx 0kB saved)"


> Old_emails_account-2 (15,4GB) I would never advise anyone to keep all their emails in one single text document. It's far too risky. Please consider creating subfolders, either to organise mail OR at least create folders with a year number and store only emails for that year in it eg: 2020, 2021 etc Then - after moving emails to subfodlers - when you compact that 'Old_emails_account-2' (15,4GB) folder in Folder Pane, it will seriously reduce in size. When compacting it - do not do anything in Thunderbird - do not exit Thunderbird - maybe go have a coffee break because the computer will need to open that enormous 15.4GB file and that will consume RAM and may take an age to open. So may not not so quick process. But it really depends upon your computer, RAM etc on how it handles things.

When you compact - the original file is opened and then scanned. Any email that is wanted - does not have a 'marked as deleted' set against it - is copied to new file. Thus ignoring all unwanted marked as deleted mail. Then new file is created and it replaces the original.

Normally this can take only a matter of seconds, but it could take a lot longer on a single text document of 15.4GB.

Read this answer in context 👍 1

All Replies (5)

more options

Version 128.3.0esr (64-bit) and still not working.

Helpful?

more options

I tested this on 'Local Folders' account. Folders Inbox and Junk on both 128.2.3esr (64-bit) and 128.3.0esr (64-bit)

I'm getting the compacting info in bottom status bar. So it's definitly working for me.

What size does it say in Folder Pane for the folder you want to compact? If you do not see 'size' - then top of Folder Pane - to the right of '+New Message' is three dots - click on them and select the 'Show folder size'

Then access the profile folder 'Local Folders'

  • In Windows search type %Appdata%
  • select %Appdata% file folder
  • Select the 'Roaming' folder
  • Select the 'Thunderbird' folder
  • Select the 'Profiles' folder
  • Select the 'profile name' folder
  • Select the 'Mail' folder
  • Select the 'Local Folders' folder

The files that have same name as folder eg: Inbox no extension contain emails. Ignore the index files they have a .msf extension. What size does it say for that eg: Inbox' file.

Helpful?

more options

Thank you for response and clarification. I will try to describe how the structure of my Thunderbird folders and accounts looks like.

  1. account-1
  • Inbox (can be compacted) (1,2GB)
  • All (can be compacted) (1,8GB)
  • Trash (can be compacted) (0kB)
  1. account-2
  • Inbox (can be compacted) (6,1GB)
  • All (can be compacted) (7,4GB)
  • Trash (can be compacted) (49,1kB)
  1. Local Folders
  • Old_emails_account-1 (cannot be compacted, nothing happens on pressing compact) (32,4kB)
  • Old_emails_account-2 (cannot be compacted, nothing happens on pressing compact) (15,4GB)

The size of the files in the path (%Appdata% \Roaming\Thunderbird\Profiles\profile_name\Mail\Local Folders) appears comparable: Old_emails_account-1 (36KB) Old_emails_account-2 (15,4GB)

I can't find out what prevent that folders from compacting.

--- One thing I see is that clicking right mouse button on Local Folders and than choose compact works, but immediately it response with "Done compacting (Approx 0kB saved)". It should go through all folders in Local Folders but it doesn't. --- Created a new test folder in Local Folders, very small (only few messages). I will try to add and delete and than compact and see what happens.

Modified by jm3

Helpful?

more options

Chosen Solution

Compact can only work if the folder contains emails which are 'marked as deleted'. An email gets 'marked as deleted' if it has been 'moved' to another folder or 'deleted'.

Compact should not be confused with compress (like zipping which does not alter the data). Compact physically removes data that is old and marked to be removed.

The Old_emails_account-2 'Size' in Folder Pane is a total of what is displayed in Message List. The Old_emails_account-2 Size is the actual size of mbox text file in mail account.

Both are the same, this implies, that mbox text file (note - it's not a folder) does not contain any marked as deleted emails. That also seems in line with the message : "Done compacting (Approx 0kB saved)"


> Old_emails_account-2 (15,4GB) I would never advise anyone to keep all their emails in one single text document. It's far too risky. Please consider creating subfolders, either to organise mail OR at least create folders with a year number and store only emails for that year in it eg: 2020, 2021 etc Then - after moving emails to subfodlers - when you compact that 'Old_emails_account-2' (15,4GB) folder in Folder Pane, it will seriously reduce in size. When compacting it - do not do anything in Thunderbird - do not exit Thunderbird - maybe go have a coffee break because the computer will need to open that enormous 15.4GB file and that will consume RAM and may take an age to open. So may not not so quick process. But it really depends upon your computer, RAM etc on how it handles things.

When you compact - the original file is opened and then scanned. Any email that is wanted - does not have a 'marked as deleted' set against it - is copied to new file. Thus ignoring all unwanted marked as deleted mail. Then new file is created and it replaces the original.

Normally this can take only a matter of seconds, but it could take a lot longer on a single text document of 15.4GB.

Helpful?

more options

It's true that emails have to be marked as deleted before you can compact a folder. The folder Old_emails_account-2 have not been touched a long time and I only deleted one email and compact starts to work. The size of this folder have reduced from 15GB -> 4GB, nice :)

Thank You!

Helpful?

Ask a question

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.