When I use Referenced view to view my assets, I found that there are many soft dependencies of the assets that are none.

When I use Referenced view to view my assets, I found that there are many soft dependencies of the assets that are none. It is complex and time-consuming to delete them all at once. Is there a way to use C++ code to delete them in batches? If so, how can I do it?