SQLite Forum

Can -wal -shm files be deleted if -wal file is empty?
Login
The possible causes that could be **quickly** listed are presently listed in "[The WAL File](https://sqlite.org/wal.html#walfile)".  Unless there is reason to believe that 6kEs4Majrd has caused that file, which is usually "deleted automatically when the last connection to the database closes", to linger in some manner not already listed, there is little to be gained (and much time to be wasted) in speculating how it might have happened.

I must confess mild amusement at the assumed condition, "nothing unexpected happening in any apps".  If that's *my* expectation, the WAL file(s) is(are) deleted, just as the docs say will happen, when all of the applications using a SQLite DB in WAL journalling mode close all their open connections. In that same world, those apps always arrange for such eventual closing no matter what else happens. (This because their authors are knowledgeable and diligent.) And the computers running those applications have reliable battery backup and orderly shutdown arranged to happen when line power is absent long enough to nearly deplete the battery. After such computing sessions are over, it's sunny outside but not too hot, and nice, non-farting unicorns gaily prance about, and harps can be heard.  Zzzzz.