What mechanism do aromatic plants use to confuse or repel irritating insects like flies?

Answer

The essential oils produced by the leaves

The essential oils present in the leaves are the chemical deterrent. These oils, which often smell pleasant to humans, act as a strong repellent to flies.

What mechanism do aromatic plants use to confuse or repel irritating insects like flies?
plantinsectrepellentHerbFly