kmail - email message not always deleted after upgrade to leap 15

I recently upgraded from a good working openSUSE 42.2 with a good working kmail to openSUSE Leap 15 with kmail 18.04.3

In this version / instance, emails are not always removed.

At the moment I received an email that I want to remove from my inbox, for this I use the ‘delete’ button (as I always did/do).
The previous email in my inbox is now marked active, but the email is not removed is still present…

Moving to another folder and then back, and delete again does not help.

When I restart kmail (actually kontact), the message is no longer present (moved to trash).

Any idea what is causing this behavior and how it can be improved (to an expected behavior)?

Looks like some kind of database corruption. If that’s the case, you need to rebuild the database by stopping akonadi, (re)moving ~/.local/share/akonadi* and restart akonadi

Are you sure about this:

ls -ld ~/.local/share/akonadi*
drwxr-xr-x 7 user1 users 4096 25 jul 13:25 /home/user1/.local/share/akonadi
drwxr-xr-x 2 user1 users 4096 25 jul 14:01 /home/user1/.local/share/akonadi-davgroupware
drwxr-xr-x 3 user1 users 4096 22 jul 11:35 /home/user1/.local/share/akonadi_migration_agent

Do you perhaps mean (added an slash): ~/.local/share/akonadi/*

So that would require:
rm -r ~/.local/share/akonadi/*

Can that be done without impact (after stopping akonadi)?

I assume that starting akonadi after removal will take quite some time.

Is there a webpage (wiki like) that explains this procedure?
Would be nice to get some inside practical akonadi information.

Related: akonadi - old files in .local/share/akonadi/file_db_data? - Applications - openSUSE Forums

Tried it…
I stopped akonadi moved the directory ~/.local/share/akonadi* to another location and restarted akonadi

Some things got recreated and than I saw some error messages, that I did not trust (didn’t copy them :frowning: ).
At this point I stopped akonadi, moved back my old directory and restarted akonadi. That gave at least a better result…

Side note:
Sometimes all the folders and emails are no longer visible. Really weird. A bit later I see them again (after starting and stopping kontact, and akonadi)…

Would be nice to get a copy and paste procedure for rebuilding the akonadi data…