Deletion of revisions not on sheets

Hi all,

I seek a way to remove revisions not placed on sheets within a project file. Any help is much appreciated!
My approach would be to get a list of all revisions, boolean if it is placed on a sheet, separate those two lists and then delete the ones which are not on a sheet.
Do you believe this approach is correct?