I think the orphan files could be deleted with a
batch script. "For each XMP file: if there is no matching RAW file delete it"
I am not at my main machine, so I have not tried every step, but I think the tools you need are already there.
- in edit / preferences / file formats define .XMP as a format the database has to index
- rescan the database to bring the .XMP files in
- use the script "Find files with missing versions or buddy", declare .XMP as master and your raw format as buddy in the script
- when all done disable or delete the .XMP format from the file formats
As I said, not fully tested this yet, but I would be surprised when it would not show the orphaned XMP files.
[edit]
When the script does not do the trick an alternative may be:
- define a file version relation between XMP and your raw formats
- rebuild the relations
- bring all the XMP files into view
- the XMP files not having a version icon must be the orphaned files
Please let us know if any of these does what you want
[/edit]