Thunderbird not compacting automatically deleted e-mails

User Help for Mozilla Thunderbird
Post Reply
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

I am using thunderbird 91.9.0 (64-bit) and using pop and keeping a local copy of all my e-mails.

The disk space for the local copy has gotten very large and I am trying to reduce it.

I went to the Thunderbird
preferences/account settings/disk space/
and set
Delete message more than 3650 days old
i.e. emails over 10 years old.

I also went to
perferences/disk space
and set
compact all folder when it will save over 1 MB in total
ask every time before compacting

When I check my folders, it appears the messages older than 10 years have been deleted.

The problem is the space used by the directory corresponding to my thunderbird files
~/.thunderbird
has not changed. (I was expecting a big decrease).
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by tanstaafl »

Empty your trash folder and then compact the accounts folders again.

You might also want to go to tools -> preferences , disable the automatic cache management, clear the cache and set its size to 0. That should get rid of hundreds, perhaps thousands, of files. If you read your mail while connected to the Internet unless you have a very slow connection I never found that cache added any value.
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

I have hundreds of folders and it seems I have to highlight each one individually and then select File/Compact Folders for each one in order to recover the space for that individual folder.

What I really wanted, but does not seem to be possible, is to delete all attachments older than 10 years, not all messages, and recover the space by only doing a few operations through the GUI interface. (I backed up my mail folder before I started this experiment).

Brad
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by tanstaafl »

file -> compact folders should compact all of the folders in the currently selected account. It does that on IMAP accounts when I have messages deleted in multiple folders in an account, and "when I delete a message" is set to "just mark it as deleted" so that I can still see deleted messages until the folder is either compacted or expunged.

There are add-ons to delete or extract attachments such as the Attachment Extractor at https://addons.thunderbird.net/en-US/th ... or/?src=ss and https://github.com/thestonehead/Thunder ... tExtractor . I don't remember what criteria it supports, you'd have to experiment.
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

I am using a POP account, so perhaps this is not being tested by the Thunderbird development team ?

As for using attachment extractor, I have posted a question and have not gotten a response; see
https://github.com/thestonehead/Thunder ... r/issues/8

I did a file->compact folders and it did seem to decrease the size reported by
du -s ~/.thunderbird

I then empted the trash and compacted folders again and the size did not change (although all the messages in the trash disappeared).

I then deleted an attachment of over 3MB from one mail message and tried to compact folders again and nothing changed in the size.

I then exited Thunderbird and then re-entered it and the size of the folder was larger than the original size.
User avatar
tanstaafl
Moderator
Posts: 49647
Joined: July 30th, 2003, 5:06 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by tanstaafl »

I'd be surprised if POP accounts weren't tested.
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

Thanks to your messages above I was able to significantly reduce the size of my thunder bird email folder.

I did a du -s ~/.thunderbird to get the size of my folder before.
Then emptied the trash.
Then checked the size after and the size had significantly reduced.

I then selected all of my draft entries and deleted them (about 87,000 mail messages).
I then checked the trash to make sure they were just draft messages.
I then emptied the trash and the size had significantly reduced.

Once I had done this, a compressed backup of my thunderbird directory would save on my usb memory stick.
(For some reason, my memory stick would not save files over a certain size even though there seemed to be enough space.)

I plan to use the procedure above to remove large messages.

I also found a way to list the size of folders using
View/Layout/Folder Pane
An then right clicking the folder Pane and choosing to display size.
This shows me which folders are using a lot of space.
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

The 87,000 seems to large, it must have been about 8,700 that I saw on the lower plane as it was reporting the progress of the delete.
bradbell
Posts: 13
Joined: December 23rd, 2005, 8:47 pm

Re: Thunderbird not compacting automatically deleted e-mails

Post by bradbell »

My junk folder was also huge, deleting entries that were old than a year, compacting it, and then empting the trash saved a lot of space.
Post Reply