I just want to make sure: can I count on this format? I mean, Isn't that possible that internal files with a prefix other than __db will exist?Your original question was about internal database files. Replication is the only part of Berkeley DB that uses internal databases. If you exclude files matching __db*.db, you will not delete our internal database files.
And one more question: Assuming we erase only files that are not internal files, is it eligible to remove some of the .db files, or there might be any dependencies between files so that if we erase few of them it will damage the others' functionality?If you are using Berkeley DB Replication, I would not recommend you delete a subset of your user databases using the file system. This will compromise the consistency of your replicated sites and you will have to reinitialize them from scratch. While using replication, if you want to remove individual databases you should use the Berkeley DB remove or dbremove calls to do this on your master so that these changes can be properly replicated to clients.