Compact not working on local folders (Thunderbird 128.1.0esr)
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 👍 1All Replies (5)
Version 128.3.0esr (64-bit) and still not working.
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.
Thank you for response and clarification. I will try to describe how the structure of my Thunderbird folders and accounts looks like.
- account-1
- Inbox (can be compacted) (1,2GB)
- All (can be compacted) (1,8GB)
- Trash (can be compacted) (0kB)
- account-2
- Inbox (can be compacted) (6,1GB)
- All (can be compacted) (7,4GB)
- Trash (can be compacted) (49,1kB)
- 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
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.
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!