Database incorrectly bloated

IN downgrading from 10 to 9, I exported all my emails and imported them back in. My database was 66 gigs, but after importing and moving the emails to the correct folders, it made my database 100 gigs.

In looking in my database I see the problem. The database folder named Local Folders is 33 gigs and currently it only has a small amount of emails only 70 mg. I know this because I exported my emails and just got the size of the 2 small folders under Local Folders.

In EM Client I’m not allowed to delete the Local Folders folder or the subfolder under it named More or under More is inbox, outbox, sent, etc. None of these can be deleted but I can delete the only 2 folders that have emails in them. Here’s the screenshot.
local f

What the best way to handle this? If I delete those 2 small folders, will my Local Folders go to 70 meg instead of 33 gigs?

My database was 66 gigs, but after importing and moving the emails to the correct folders, it made my database 100 gigs.

If you have eM Client for Windows and believe that the database size should be smaller, then try closing eM Client and then running the following “rebuildall” command below in a command prompt window as per @Gary post from the following thread.

https://forum.emclient.com/t/optimize-database/89795/4

Gary’s post extract from the above thread.

Note: Before running, backup eM Client first via “Menu / Backup” incase you need to restore for any reason. You can see when the backup is complete in Show Operations via clicking the drop-down on the right of Refresh top left.

i did the db repair and my database went from 100 gigs to 156 gigs. I then moved all the dat-bak files out and put them in a separate folder just in case. Now my database is at 66 gigs, like it was before I exported all the folder from version 10 and imported them back into version 9. Why do we have these dat-bak files? I assume it ok to remove them, since it’s working fine now

Why do we have these dat-bak files?

From Googling around, Bak extension usually allows storing the backup of SQL server database data and they are probably just generated when you rebuild the database.

@Gary do you need to keep those files ?

I assume it ok to remove them, since it’s working fine now.

I would personally just delete them if eM Client is working ok without them.

Before deleting them though, suggest to first “make a manual backup of eM Client via “Menu / Backup” just incase you need to restore for any reason”. You can see when the backup is complete in Show Operations via clicking the drop-down on the right of Refresh at the top left.

I deleted them and it’s working fine.

Since my database was 66 gigs and I had already exported my EML files I got this App - and it removes all the attachments from EML files. It reduced my database from 66 gigs to 15 gigs. I left 5 years of emails with attachments, yet once I’m confident with this, I’ll reduce most of them too

So I now separated my emails earlier than 2020 and removed all the attachments and imported them back in. As a precaution, I saved all the emails EML with the attachments intact.

The problem is that after the database procedure to repair the database, it still showed 66 gigs. Plus another 66 gigs of dat-bak files. I haven’t removed them yet. I’m now running the database repair again and I see the same thing, both files are 66 gigs with the current time stamp. So running this several times seems to not work.

Can this be fixed or do I need to uninstall and reinstall version 9 and re-import all the folders?

You can remove the attachments right in eM Client. You don’t need to export, remove using other software, then import again.

One way is to right-click on the attachment in eM Client and choose Remove.

And if you have a paid license, you can just remove them en masse from the Attachments section. Or just those from some years, or from some accounts, or those over certain sizes.

I had no idea there was an attachment section. It’s great, very flexible. I’ll just use the database from 2 days ago and use this to delete the attachments. Will this then show up as making my database smaller? Or do I need to run the rebuild database CMD?

Yes, if you delete attachments, the database will be smaller.

It worked, my database went from 66 gigs to 26 gigs by deleting all attachments, leaving only the last 4 years. Are the attachments that are removed saved somewhere?