In regular transformations (i.e. when the input and output metamodels are different), you don't need to "delete" elements as you are only creating new elements into the target model (initially empty).
In your current example, you should probably add a guard to the input pattern of your rule in order to match it (and thus create the corresponding model element) only when required.
I encourage to take a look to the ATL user guide to get more insights on this.