8 Plants That Repel Fruit Flies (Plants They Hate)

We are 100% reader supported. We may earn commission at no extra cost to you if you buy through a link on this page. Read our disclosure.

Share this page!

Fruit fly
Fruit flies are nuisance pests that can quickly multiply, leading to infestations. carnifex / CC BY 4.0

The fruit fly, a common term for Drosophila melanogaster and its close relatives, is one of the most widespread insects. Its populations thrive wherever human settlements are found, particularly if it can access kitchen trash. Drawn to the scent and taste of ripening fruits and vegetables, its rapid life cycle is supported by the nutrients in perishable garden produce. Thus, infestations easily occur in places where food is allowed to spoil.

Nowadays, fruit fly colonies are extremely common in supermarkets, restaurants, and homes. As a single fly can quickly lead to an infestation, especially in the presence of nutrient-rich media on which its larvae can hatch and feed, it is a nuisance pest. Fruit flies can contaminate food, spreading pathogens in the process. To effectively reduce the chances of infestations, potential breeding sites would need to be located and thoroughly eradicated.

This is often challenging in a kitchen, where we naturally store fresh produce. It isn’t always possible to dispose of waste right away, especially during days that require lots of food prep. A great way to discourage fruit flies from coming into your home and potentially bothering you or your guests would be to grow fragrant herbs!

The plants listed below can be placed in key areas, such as close to entry points and next to tabletop trash bins. Note that, while these do repel fruit flies, these won’t stop infestations from occurring in unclean areas.


1) Rosemary (Salvia rosmarinus)

Rosemary plant
The rosemary plant has needle-like leaves with a bitter taste and strong scent, making itself unattractive to fruit flies and other insects. Michał, CC BY-SA 4.0, via Wikimedia Commons

Native to the Mediterranean

A shrub that brings a wealth of ecological benefits wherever it is grown, rosemary is set apart by its leathery, needle-like, and deep-green foliage. Heavily scented, the leaves have a bitter taste and are rarely consumed by grazers. The phytochemicals responsible for its bitterness likely evolved as a natural means of protecting its wild stands. It doesn’t hurt that the shoots and blooms have remarkable ornamental value as well!

Rosemary essential oil is largely composed of camphor, rosmarinic acid, and carnosol. When used in a study that aimed to evaluate the deterrent potential of herbal oils against fruit flies, it presented a significant repellency toward Drosophila suzukii. The oil must be fresh, however, to mask the scent of plant juices. You may opt to soak cotton buds in pure extracts of rosemary oil. Place a bowl of these in the kitchen to throw off any approaching flies.

Fresh cuttings of rosemary may also be used for this purpose, though you’ll have to harvest a lot of stems to create a strong scent cloud. Consider placing pots of well-established rosemary shrubs close to kitchen windows or outdoor disposal areas. Apart from masking the scent of plant waste, these should enhance your garden’s diversity and improve its visual value.


2) Lavender (Lavandula spp.)

Spike lavender
Spike lavender (pictured) is one of a number of lavender species that produce some of the most volatile essential oils. Alain Bigou, CC BY-SA 2.0 FR, via Wikimedia Commons

Native to Europe, Africa, and Asia

Known for bringing ecological benefits to both urban and rural gardens, lavender is definitely one of the most valuable herbs in a gardener’s arsenal. Its muted green foliage and spikes of pastel-colored inflorescences signify a region’s agreeable ambient conditions. Best grown in mild climates and under full sun exposure, the presence of its well-established stands can help control fruit fly populations in a number of ways.

Lavender shoots and blooms are packed with distinctly fragrant essential oil. Although this appeals to humans, it has a negative effect on many scent-sensitive insects and grazers. These find both its scent and taste overpowering. Direct contact between a fruit fly and lavender oils can have irreversible effects on the former, causing significant damage to its nervous system. Rich in varied concentrations of linalool, camphor, and limonene, the oils can function as natural insecticides.

Researchers have looked into the deterrent effects of lavender oils as a natural protectant for berry crops. When combined with other strongly-scented botanical oils, such as that of catnip (Nepeta cataria), it has the potential to serve as a safe alternative to broad-spectrum insecticides. Popular species like English lavender (L. angustifolia) and spike lavender (L. latifolia) produce some of the most volatile oils.


3) Bay laurel (Laurus nobilis)

Bay laurel
Indoors, you can repel fruit flies by placing freshly harvested bay laurel leaves around ripening produce. Photo by David J. Stang, CC BY-SA 4.0, via Wikimedia Commons

Native to the Mediterranean

Popularized by its versatility in both the kitchen and the garden, bay laurel is a plant with many fantastic uses. Typically cultivated as a large shrub or a small tree, this evergreen species produces glossy, fragrant leaves. These are borne by elegant, woody stems with a tolerance for a wide range of ambient conditions. The stems can easily be pruned back to maintain a more manageable size for container gardens.

The foliage of the bay laurel tree is its chief defense against destructive insects. Known for repelling spider mites, aphids, and whiteflies, they are packed with aromatic essential oil. The strong scent profile of the phytochemical-rich oil can deter fruit flies and mask the smell of other plants. Eugenol and cineole are just a couple of the oil’s naturally pesticidal components.

To control fruit fly populations in indoor locations, you can place freshly harvested bay leaves around ripening produce. The scent emitted by the leaves should discourage flies from coming too close. The crushed leaves can also be packed into porous sachets and placed around food waste receptacles. Just make sure to occasionally replenish the leaves so that a strong scent can be maintained.


4) Peppermint (Mentha x piperita)

Peppermint leaves
You can use excess peppermint cuttings to mask the scent of rotting plant material in your trash can. Rillke, CC BY-SA 3.0, via Wikimedia Commons

Native to Europe

Fruit flies and many other scent-sensitive insects simply can’t stand the scent of peppermint oil. Packed with fragrant phytochemicals like menthol, pulegone, and limonene, the essential oil is found throughout the leaves and shoots of this delicate herb. Rubbing or crushing the leaves immediately releases the fragrant oil and signals the presence of potential toxins to nearby pests.

A hybrid between two remarkably hardy mint species, watermint (M. aquatica) and spearmint (M. spicata), peppermint favors moist conditions in partly shaded locations. It can be grown as a potted plant on a sunny windowsill or as an outdoor herb in areas that may be frequented by troublesome insects. Its well-developed leaves can be used in the kitchen, of course. Excess cuttings can be placed into the trash bin, alongside food waste, to help mask the scent of rotting plant material.

Fresh leaves can also be placed around fruit bowls and baskets with juicy vegetables. In the absence of an actual peppermint plant, you can make use of its store-bought extracted oils. Used tea bags containing peppermint leaves should do the trick as well. Place these, as a deterrent or a deodorizer, wherever you may find fruit flies and their close relatives.


5) Tansy (Tanacetum vulgare)

Tansy flowers
You should wear gloves when harvesting tansy leaves, as its sap can cause contact dermatitis. Joanna Boisse, CC BY-SA 4.0, via Wikimedia Commons

Native to Eurasia

Grown for its yellow inflorescences of button-like blooms, tansy is a common herb throughout the temperate zones of its native range. Today, it has naturalized stands in many areas with fertile substrates, largely because it is grown as a companion plant. In vegetable gardens, its presence can help control populations of pests like Colorado potato beetles. Its repellent qualities are largely attributed to its fragrant oils.

The volatile essential oil of T. vulgare is composed of toxic phytochemicals like thujone, camphor, and 1.8-cineole. Individually, these components are known for their insecticidal properties and their potential as active ingredients in biopesticides. The leaves of mature tansy plants can be harvested and distributed around areas that are prone to being infested by all sorts of flies. Even ants, ticks, and fleas are repelled by their strong scent.

When harvesting tansy leaves, it is advisable to wear garden gloves and make use of proper shears, as the plant’s sap can cause contact dermatitis. For the purpose of controlling fly populations outdoors, the intact form of the plant should work wonderfully, especially during its flowering period. The blooms attract parasitic wasps, which should help compromise the life cycle of many pests.


6) Sage (Salvia officinalis)

Potted sage plant
Placing sage leaves around the kitchen and close to windowsills can help deter fruit flies. Mokkie, CC BY-SA 3.0, via Wikimedia Commons

Native to the Mediterranean

As a fragrant herb with medicinal, culinary, and even mystical uses, sage appears in historical texts as one of the most valuable plants in its native range. Distinguished by leathery, hairy, and visually appealing foliage, it is often described as a plant with miraculous properties. Rubbing or crushing the leaves reveals an intense and heady aroma. This is generated by its volatile essential oil.

Used to treat a wide range of ailments, from wasp bites to headaches and tremors, sage extracts seem to have a direct effect on the nervous system. Its effects presumably extend to all animals that come into contact with its essential oil. Thujone, one of the secondary metabolites in sage leaves, has neurotoxic properties. When tested against the Greek fruit fly (Bactrocera oleae), the essential oils of sage and other herbs (Mentha pulegium and Salvia fruticosa) exhibited potential as natural insecticides.

Sage leaves can be collected and bundled up with those of other herbs to create an all-around fruit fly repellent that can be placed in key parts of the home. Place fresh bundles around the kitchen and close to windowsills. You can also make use of pure sage oil extracts as part of a repellent spray or in a scent diffuser. The fragrance should dissuade all types of flies from coming too close.


7) Lemon balm (Melissa officinalis)

Bumblebee on lemon balm
Lemon balm’s white blooms attract many bees in the summer. Gideon Pisanty (Gidip) גדעון פיזנטי, CC BY 3.0, via Wikimedia Commons

Native to Europe and Central Asia

Named for the pleasant, lemon-like scent of its delicate leaves, lemon balm is a perennial herb that grows to about 3 feet (1 meter) tall. In summer, its mature shoots produce nectar-rich, white blooms that unfailingly appeal to bees. As a result, it is typically cultivated to attract bees for the production of lemon balm honey. It is also grown as a source of its fragrant essential oil, which is used in the perfume industry.

Like many other scented herbs, lemon balm is appealing to us but acts as a deterrent to many pests in nature. When its heart-shaped, scallop-edged leaves are crushed, they release a yellowish oil. Rich in compounds like geraniol and citronellal, the oil naturally repels flies. It works much like that of citronella, which shares many of its major components. Place crushed leaves around the kitchen to help mask the scent of fruits and minimize the occurrence of fruit flies.


8) Basil (Ocimum basilicum)

Basil plant
To force basil to release its oils, you should regularly harvest some of its leaves. Burkhard Mücke, CC BY-SA 4.0, via Wikimedia Commons

Native to tropical Africa and Asia

Basil comes in several varieties, many of which have culinary importance in countries outside of their native range. This valuable herb is often grown as an annual in temperate climates, though its stands may persist as perennials in warm regions. Chiefly cultivated for their flavorful leaves, basil varieties tend to have subtly different scents and flavor profiles some are sweet whereas others have a more spicy character.

The major constituents of basil oils are linalool, estragole, eugenol, 1.8-cineole, and myrcene. Present in many of the fly-repellent herbs listed above, these phytochemicals are known for their pesticidal properties and their collectively overpowering fragrance. Basil essential oil can compromise the nervous system of flies and mosquitoes. It can also function as a nematicide and fungicide.

If you’re eager to grow your own stands of basil, you should situate them close to the entry points of your home or grow them as border plants by windows. Regularly harvest some leaves to force your plants to release their oils. You may also use store-bought extracts of basil oil. Use a diffuser or incorporate the oil into a water-based spray to distribute its scent throughout your home.


Controlling Fruit Flies With Carnivorous Plants

Venus flytrap with insect
Fruit flies are unlikely to survive once they are caught in a Venus flytrap. incidencematrix, CC BY 2.0, via Wikimedia Commons

Adored by plant enthusiasts for their unique ability to trap and metabolize insects, carnivorous plants are some of the most interesting tropical species. These typically come in three forms: the fly trap (Dionaea muscipula), pitcher plant (Nepenthes spp.), or sundew (Drosera spp.). While the plants listed above control fruit fly populations by repelling them, these ones eliminate fruit flies by attracting them!

Though these plants are morphologically different, they are all equipped with lures for attracting and trapping flies. Once a fruit fly is lodged between the modified leaves of a fly trap, trapped in the vase-like contraption of a pitcher plant, or stuck on the mucilage of a bright sundew, it has nary a chance of survival. In the wild, these wondrous plants are sustained by the nutrients they obtain from their prey. If you’d love to see nature in action, cultivate a few of these close to areas that may attract fruit flies!

Angeline L
About the author

Angeline L

I'm a passionate researcher and scuba diver with a keen interest in garden plants, marine life, and freshwater ecology. I think there’s nothing better than a day spent writing in nature. I have an academic and professional background in sustainable aquaculture, so I advocate for the responsible production of commercial fish, macroinvertebrates, and aquatic plants.

Read more about Pond Informer.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.