The summer brings forth some of the freshest gastronomic delights of the year. From juicy peaches, berries, and tomatoes to crispy bell peppers and corn, excellent produce abounds in the warmer months, and it practically begs for a starring role in your weeknight dinner. But as your fruits and vegetables sit on your counter waiting for their time to shine, some pesky pests might find their way into the bowl with them.

With their attraction to ripe and fermenting produce — as well as the yeast and sugars found in beer, wine, and cocktails — fruit flies ramp up as temperatures soar, as the heat provides ideal conditions for reproduction. But even if you find yourself with an irritating infestation on your hands, you might already have the solution for it sitting right there in your kitchen cabinet.

It turns out that cinnamon works as a powerful repellent against fruit flies (and a host of other insects) thanks to the presence of eugenol in the spice. A member of the allylbenzene class of chemical compounds, eugenol is responsible for the strong scent cinnamon is associated with. And while that fragrance might be pleasing to humans when stirred into our coffee or baked into our favorite desserts, it has the opposite effect on bugs.

Get the latest in beer, wine, and cocktail culture sent straight to your inbox.

The smell of eugenol is repulsive to fruit flies, which is why it’s a common ingredient in insecticides that repel critters away from your beloved produce. The chemical compound also disrupts the insects’ production of pheromones, which help the flies communicate with one another. Without pheromonal communication, fruit flies are unable to reproduce, further eliminating an invasion in your fruit basket.

To best use this cinnamon hack in your own kitchen, it’s important to identify where exactly the gnats are coming from. If they’re festering in your fruit bowl, simply drop a few whole sticks of cinnamon in there alongside your peaches, bananas, and apples. The spice’s flavor won’t leach into your fruit, but the aroma will be strong enough to ward off the pests. The best part? Results are almost immediate. With the fruit flies despising the scent so much, they’re sure to hit the road fast.

If you’re unable to track down the specific source of your fruit fly flock, fear not. Cinnamon can be used in various other applications to ward off the bothersome bugs. For a more widespread infestation, sprinkle the spice in its ground form around common entry points in your home including cupboards, cabinets, and window sills. The powder will help deter bugs from venturing into your home.

Suspect the problem is actually coming from your plants and is being made worse by the presence of produce in your kitchen? Shake some ground cinnamon or cinnamon oil into a spray bottle filled with water and douse your soil. Not only will this eliminate the fruit fly problem, but your plants will thank you for keeping their root systems safe.

*Image retrieved from Anne via stock.adobe.com