If flies are ruining your patio dinners or sneaking through the kitchen window, a few well-placed plants can make a real difference. Lavender, basil, mint, rosemary, and lemongrass are the most reliable options for most US households—they produce fragrant volatile compounds that flies find off-putting, and they’re easy to grow in pots or garden beds.
The science is a bit nuanced: lab studies show results vary by fly species and compound concentration. But gardeners have relied on aromatic herbs for fly control for centuries, and the practical evidence is solid. These plants won’t eliminate a fly infestation on their own, but used as part of your outdoor setup, they significantly reduce how many flies bother you. The bonus—they’re also useful in the kitchen.
Here’s what works, where to put it, and a few pet-safety warnings you should know before you plant.
Should You Try Fly-Repelling Plants?
✅ Best For
- Homeowners who want a chemical-free, low-maintenance deterrent
- Anyone already growing herbs on a windowsill or in the garden
- Outdoor entertaining—flies at patio dinners are a common complaint
- Pet owners looking to avoid DEET-based sprays (with caveats below)
❌ Skip If / Supplement With Something Else If
- You have a serious infestation—plants slow flies down, they don’t eliminate them
- You need immediate results (plants need time to establish and release scent)
- You live in a small apartment with no windowsill space for pots
Why Certain Plants Actually Repel Flies
Flies navigate primarily by smell. When they detect an unfamiliar or unpleasant scent, they typically move on rather than investigate. Aromatic plants produce volatile organic compounds (VOCs)—chemicals stored in tiny oil droplets on leaf surfaces—as a natural defense against pests. When leaves are brushed or bruised, these oils release into the air.
The main compounds involved are:
- Linalool — found in lavender; widely cited as a fly deterrent
- Menthol, menthone — found in mint; repels flies, gnats, and ants
- Borneol, camphor — found in rosemary and sage
- Geraniol, citronellal — found in lemongrass and citronella grass
- Pyrethrin — found in chrysanthemums; the same compound used in many commercial fly sprays
One important note: a peer-reviewed study published in the Journal of Vector Ecology found that lavender oil alone didn’t significantly repel adult house flies in controlled lab conditions. Vetiver and cinnamon oils outperformed it in that specific test. That doesn’t mean lavender plants are useless—growing conditions and open-air settings differ from lab olfactometer tests—but it’s worth being honest about what the research shows.
To get the most out of your plants, brush or lightly crush the leaves before outdoor meals. Movement releases the oils faster.
The 5 Best Plants for Keeping Flies Away (Easiest to Grow)
These five are the go-to choices for most US homes—reliable, widely available, and useful beyond just deterring flies.
1. Lavender — Best All-Around Option
Lavender is the most popular fly-deterring plant, and for good reason. It’s drought-tolerant, low-maintenance, and smells great to humans while flies want nothing to do with it. The active compound is linalool, which is also used in commercial fly-repelling products.
- Works against: house flies, mosquitoes, moths, fleas
- Growing zone: USDA zones 5–8 as a perennial; grow as an annual elsewhere
- Placement: patio borders, sunny windowsills, near entryways, bedroom windows
- Dual use: culinary (baked goods, sauces), aromatherapy, dried sachets for closets
- Pet safety: Generally considered safe for dogs and cats at normal plant exposure
- Tip: English lavender (Lavandula angustifolia) is the most fragrant variety. Deadhead spent blooms and crush stems occasionally to keep oil production high.
Starter packs of 3–4 lavender plants are available on Amazon (check current pricing); you can also find them at most garden centers in spring.
2. Basil — Best Near Food Prep Areas
Basil is already on most people’s grocery lists, and it’s one of the more effective fly deterrents you can put right on your kitchen windowsill. The active compounds—estragole, linalool, and eugenol—make it unappealing to house flies and mosquitoes alike.
- Works against: house flies, mosquitoes, whiteflies
- Growing difficulty: Easy annual; grows fast in a sunny window or patio pot
- Placement: kitchen windowsill, near the grill, on the picnic table
- Dual use: pesto, pasta, salads, caprese—it doesn’t get more useful than this
- Pet safety: Generally safe for cats and dogs in normal amounts
- Tip: Pinch off flowers as they form—flowering shifts the plant’s energy away from leaf production, which weakens the scent. Sweet basil and Thai basil are both effective.
3. Mint — Best for Covering More Ground
Mint is one of the strongest-smelling herbs in any garden, and flies dislike it. The menthol, menthone, and methyl acetate in mint leaves create a scent barrier that also deters gnats and ants.
- Works against: house flies, gnats, ants, aphids
- Growing difficulty: Very easy—but keep it in a pot. Planted directly in soil, mint spreads aggressively and can take over an entire bed within one season.
- Placement: Pot by the back door, near garbage bins, around the compost pile
- Dual use: teas, cocktails, cooking, fresh garnishes
⚠️ Pet safety warning: According to the ASPCA’s Poison Control database, mint is listed as toxic to dogs, cats, and horses, with essential oils as the toxic principle. Pennyroyal mint in particular contains pulegone, which can cause liver failure in cats even in small amounts. For homes with pets, stick to spearmint or peppermint—both repel flies and have much lower essential oil concentrations than pennyroyal. Keep plants out of reach of animals who might chew on them.
4. Rosemary — Best for Outdoor Beds and Grilling
Rosemary is a garden workhorse. It smells strong enough to deter flies and mosquitoes, handles drought well, and doubles as a fantastic seasoning for grilled meats. The active compounds are borneol and camphor.
- Works against: house flies, mosquitoes, garden pests
- Growing zone: Perennial in USDA zones 7–10; treat as annual in colder zones or bring indoors for winter
- Placement: patio containers, garden borders, near the outdoor grill or dining area
- Dual use: cooking, roasting, infused oils
- Pet safety: Safe for dogs and cats in normal garden amounts
- Tip: Throw a few fresh rosemary sprigs directly onto hot coals when grilling—the smoke adds flavor and keeps flies away from the food at the same time.
5. Lemongrass — Best in Warm Climates
Lemongrass is a tall, ornamental grass with a strong citrus scent—geraniol, citronellal, and citronellol are the compounds that keep mosquitoes and flies at a distance. It’s the same family as citronella grass, which is the basis of many commercial mosquito products.
- Works against: mosquitoes, house flies, gnats
- Growing zone: Year-round perennial in USDA zones 10–11 (southern Florida, southern Texas, southern California). In zones 3–9, grow as a seasonal annual or bring indoors before first frost. It can grow up to 5 feet tall and 3 feet wide in a single season, according to Bonnie Plants’ growing guide.
- Placement: Large patio pots, yard borders in warm climates
- Dual use: Southeast Asian cooking (soups, curries, marinades), herbal teas
- Tip: Plant lemongrass in a large pot (at least 12″ diameter) even in warm climates—it makes it easier to bring inside during cold snaps.
5 More Plants Worth Planting
Beyond the top five, there’s a second tier worth knowing about—some are standouts for the vegetable garden, others handle specific situations that culinary herbs can’t.
6. Marigolds — Best for Vegetable Garden Borders
Marigolds are a classic companion plant. They produce limonene and alpha-terthienyl (mainly in their roots), which deter a range of flying pests. Plant them around the perimeter of your vegetable bed and they’ll help protect tomatoes, peppers, and cucumbers from whiteflies and aphids.
- Growing difficulty: Very easy annual; direct-sow seeds after last frost
- Pet safety: Mildly toxic to dogs and cats (mild GI upset if ingested in quantity)
- Tip: French marigolds (Tagetes patula) are more effective than African marigolds (Tagetes erecta) for pest deterrence.
7. Chrysanthemum — Contains Natural Pyrethrin
Chrysanthemums contain pyrethrin in their flowers—the same compound extracted for use in commercial fly sprays, flea shampoos, and garden insecticides. Planted outdoors, they passively ward off flies, mosquitoes, ants, and roaches.
- Works against: flies, mosquitoes, ants, roaches, ticks
- Growing difficulty: Easy to moderate
⚠️ Important pet safety warning: According to the ASPCA, chrysanthemums are toxic to dogs, cats, and horses. The toxic principles include sesquiterpene lactones, pyrethrins, and other irritants. Clinical signs of toxicity include vomiting, diarrhea, drooling, incoordination, and skin irritation. Skip this one if you have cats or dogs that roam the garden.
8. Sage — Good for the Herb Garden and the Grill
Sage produces thujone and borneol—compounds that keep house flies, cabbage moths, and carrot flies away. It’s a perennial in most US climates (zones 4–8), so once planted, it comes back year after year with minimal effort.
- Dual use: Excellent seasoning for poultry, pork, and butter sauces
- Extra tip: Burning a bundle of dried sage concentrates the repellent compounds and is effective for clearing flies from an outdoor space before a gathering
9. Tansy — Old-Fashioned and Effective, but Handle With Care
Tansy was used in medieval Europe as a strewing herb—scattered on floors to repel flies and other pests. The camphor and thujone in its yellow button flowers are genuinely effective against flies, ants, fleas, and moths.
⚠️ Safety warning: Tansy is toxic if ingested by humans, dogs, and cats. It can spread aggressively in garden beds. Grow it in a contained area and keep it away from children and pets. Given the safety concerns, it’s better suited for back-of-yard or perimeter planting away from high-traffic areas.
10. Bay Laurel — Best for Pantry Pest Control
Bay laurel (the source of bay leaves used in cooking) contains more than 55 volatile organic compounds that flies, moths, weevils, and roaches find off-putting. A few dried bay leaves scattered on pantry shelves will deter moths and weevils from getting into flour, oatmeal, or rice—and live plants on a patio or windowsill help keep flies at bay.
- Growing difficulty: Easy; grows well in containers and can be kept trimmed as a small shrub
- Pet safety: Generally safe in normal culinary amounts; check with your vet if an animal ingests significant quantities
- Tip: No need to buy a live plant just for pantry use—a $2 jar of dried bay leaves from the grocery store works just as well on shelves.
Quick Comparison: 10 Fly-Repelling Plants at a Glance
| Plant | Fly Type | Indoor / Outdoor | Pet-Safe | Difficulty | Culinary Use |
|---|---|---|---|---|---|
| Lavender | House flies, mosquitoes, moths | Both | Yes | Easy | Yes |
| Basil | House flies, mosquitoes | Both | Yes | Easy | Yes |
| Mint (spearmint) | Flies, gnats, ants | Both | Use caution* | Easy | Yes |
| Rosemary | House flies, mosquitoes | Both | Yes | Easy | Yes |
| Lemongrass | Mosquitoes, house flies | Outdoor (zones 10–11) or seasonal | Yes | Moderate | Yes |
| Marigolds | Whiteflies, aphids | Outdoor | Mild caution | Easy | No |
| Chrysanthemum | Flies, mosquitoes, ants | Outdoor | ❌ Toxic to cats & dogs | Moderate | No |
| Sage | House flies, moths | Both | Yes | Easy | Yes |
| Tansy | Flies, ants, fleas, moths | Outdoor | ❌ Toxic to humans/pets | Easy | No |
| Bay Laurel | Pantry pests, flies, moths | Both | Yes | Easy | Yes |
*Spearmint and peppermint are lower risk for pets than pennyroyal mint. Keep all mint away from animals that tend to chew plants. Source: ASPCA Poison Control
Where to Put Your Plants for Maximum Effect
Placement matters more than quantity. A pot of basil right next to your kitchen window does more work than a lavender bush planted 30 feet from the house.
- Kitchen windowsill: Basil, bay laurel, mint (in small pots)
- Patio or deck: Lavender, rosemary, lemongrass in containers near seating
- Back door or entryway: Basil, mint — flies tend to enter through doors
- Near garbage bins or compost: Mint, tansy (keep away from pets), wormwood
- Vegetable garden borders: Marigolds, nasturtiums, lavender
- Pantry shelves: Dried bay leaves scattered on shelves or in grain containers
How to Get More Out of Your Plants
Live plants need a little help to maximize their fly-deterring effect, especially outdoors where airflow disperses the scent quickly.
- Brush or crush leaves before outdoor meals to release volatile oils from the surface
- Trim regularly — actively growing plants push out new, oil-rich leaves; older plants that never get trimmed have lower oil output
- Dried herbs still work in enclosed spaces like pantries and cabinets — crumble a few leaves into a small sachet
- Water in the morning rather than evening to prevent fungal issues, which can degrade fragrance and plant health over time
- Group aromatic plants together near entry points for a combined scent barrier rather than scattering them across a large yard
Frequently Asked Questions
What plant keeps flies away most effectively?
Lavender and basil get the most consistent positive feedback from gardeners for general fly deterrence. For mosquitoes specifically, lemongrass and citronella grass are the standouts. If you want one plant that does the most work with the least effort, go with lavender—it handles both flies and mosquitoes, tolerates drought, and works indoors and out.
Do these plants work against fruit flies?
Somewhat. Fruit flies (Drosophila melanogaster) are a different species than house flies and are attracted mainly to fermenting organic matter—overripe fruit, drain buildup, compost. Basil near a fruit bowl may help reduce them slightly, but the primary fix for fruit flies is removing the food source (cover fruit, clean drains, empty compost bins frequently). Plants alone won’t solve a fruit fly problem.
Are fly-repelling plants safe for dogs?
Most culinary herbs—lavender, basil, rosemary, sage, lemongrass, bay laurel—are considered safe for dogs at normal exposure levels. Avoid chrysanthemum, tansy, and especially pennyroyal mint in yards where dogs roam freely. If a dog ingests significant amounts of any plant, contact your vet or the ASPCA Poison Control at (888) 426-4435.
Which of these plants are toxic to cats?
Chrysanthemum is toxic to cats (vomiting, diarrhea, drooling, incoordination) according to the ASPCA. Tansy is also toxic. Pennyroyal mint can cause liver failure in cats. For cat-heavy households, stick to lavender, basil, spearmint, rosemary, sage, lemongrass, and bay laurel—and keep all plants elevated or out of reach if your cat is a chewer.
Do dried herbs repel flies as effectively as live plants?
In enclosed spaces like pantries and closets, dried herbs work well—especially bay leaves, lavender sachets, and dried mint. In open outdoor areas, dried herbs lose their potency quickly because the volatile oils disperse and aren’t replenished. For outdoor fly deterrence, live plants in pots are more effective.
Can I grow these fly-repelling plants in an apartment?
Yes, several of them work well in small pots on a windowsill with decent sun exposure: basil, mint, and bay laurel all do fine indoors. Lavender needs a sunny south-facing window and may struggle without at least 6 hours of direct light. Lemongrass and rosemary need more space and sun than most apartments provide, though rosemary can survive in a moderately sunny window.
How many plants do I need to actually make a difference?
There’s no magic number. Placement matters more than quantity—two pots of basil right next to your kitchen window beats ten pots on the far side of the yard. Start with two or three pots of different species near your main problem areas (doors, dining spaces, garbage areas). You’ll notice a difference, especially when combined with keeping those areas clean.
Do marigolds keep flies away?
Marigolds are most reliable against whiteflies, aphids, and some nematodes—they’re a staple in companion planting around vegetable gardens. Their track record against common house flies is less well-documented. Think of them as a garden border plant that offers general pest resistance, rather than a targeted house fly repellent.
Where to Get Started
The easiest way to start is with a pot of basil from your grocery store or a lavender plant from a garden center. If you’d rather shop online, lavender starter plant packs and organic basil seed variety packs are available on Amazon (check current pricing—it changes frequently). For larger plantings, local nurseries and big-box garden centers (Home Depot, Lowe’s) carry most of these in 4″ pots for a few dollars each in spring.

