How can I remove Null component in prefab,Not missing

like this, The script has been fully commented out,i want create a editor scripts to batch.should i delete scripts make it missing?

7583596--940048--upload_2021-10-19_11-6-38.png

I think you are looking for this one Unity - Scripting API: GameObjectUtility.RemoveMonoBehavioursWithMissingScript