How can I destroy GameObjects on the screen with the same name?

I’ve got a prefab called “GoodBall” and there is a method what creates these gameobjects. Iwould like to destroy them with a method. So if I play on the inspector it looks like : GoodBall(Clone).
How can I destroy them?

I would suggest using tags. Tags are a way to group similar game objects into one group. It you put a tag titled “ball” on the prefab, when it is created in the scene it will remain with that tag. You can then destroy them all using:

gameObjects = GameObject.FindGameObjectsWithTag (“ball”);

 for(var i = 0 ; i < gameObjects.length ; i ++){
     Destroy(gameObjects*);*

}
IMPORTANT here is what tagging is if you are unfamiliar with this concept. Tags - Unity Official Tutorials - YouTube

You’re best bet is still on instantiation to keep an array index of these objects and Destroy those objects.

When instantiating, you can also make a referance to instantiated GameObject which can be used later on script. Like this (Three dots means you can fill there with whatever you want, as long as it’s an instantiatable object.):

GameObject go = Instantiate(...) as GameObject;

Then, you can use “go” referance to destroy the object:

Destroy(go);

Best wishes.