How to get rid of many unseen faces?

Here’s my best solution to this issue. (Note that this action must be performed before removing duplicate vertices)