This is mainly an SQLite question (TomH are you here?).
I had downloaded a lot of info from FS into RM. Then I developed a query to identify the ones that I did NOT need to keep and gave them all a particular colour coding. Then I used an SQLite query (Delete Many) that deleted every person with that colour coding and cleaned up all the unused fact types and places and sources etc etc etc (Delete Phantoms3). After all that, run all the database tools and RM is happy with the results, and it looks like what I was intending.
The SQLite script was developed before the FS integration and so it does not know how to cleanup the references in the tables that were added when FS integration was added. In particular, there are some entries in some table that indicates that a PersonID (which no longer exists) is matched to a particular FS ID. So I'm looking for a script that can clean up those references. I'll go poke around in SQLite Spy and see if I can figure anything out but, if you know how to do this, please respond here!