To clean out unwanted contact data from your collection databases, there are some referential integrity constraints that mean the deletions have to happen in a specific order. The following query will delete all contacts, facets, interactions, interaction facets, and contact identifiers from xDB.
delete
FROM [xdb_collection].[ContactIdentifiers]
delete
FROM [xdb_collection].[ContactIdentifiersIndex]
delete
FROM [xdb_collection].[ContactFacets]
delete
FROM [xdb_collection].[InteractionFacets]
delete
FROM [xdb_collection].[Interactions]
delete
FROM [xdb_collection].[Contacts]
You will need to run this on both Collection shards.