Looking for what plants keep flies away in the garden, patio, or around doors and windows? The best answer is to use strongly scented herbs and flowers that can help discourage flies from lingering, especially when you place them where people sit, cook, or enter the home.
No plant will eliminate flies on its own, but the right choices can make your space less attractive to them while adding beauty, fragrance, and pollinator-friendly blooms. Success depends on good placement, healthy growth, and keeping the area clean enough that flies do not have easy breeding sites.
What plants keep flies away?
Herbs and flowers with strong aromatic oils are the most useful choices for discouraging flies. Good options include basil, mint, lavender, rosemary, catnip, marigolds, and scented geraniums. These plants work best when grown densely near seating areas, doors, compost bins, and kitchen gardens, where their scent is strongest.
Best plants to discourage flies
Basil
Ocimum basilicum is one of the easiest fly-deterring herbs to grow in warm weather. Its leaves release a strong scent when brushed or crushed, which is one reason gardeners often place basil near patios and outdoor tables.
Basil grows best in full sun, rich soil, and consistent moisture. Pinch the tips regularly to keep plants bushy and delay flowering, because leafy, actively growing basil tends to be more useful than tall, leggy plants.
Mint
Mint is strongly scented and can help make a small area less appealing to flies. Peppermint and spearmint are common choices, but mint spreads aggressively, so it is best grown in containers rather than directly in the ground.
Use a pot with drainage holes and keep the soil evenly moist, not soggy. If you plant mint in the landscape, expect it to spread by runners unless you contain it.
Lavender
Lavandula species are valued for their fragrance, drought tolerance, and tidy shape. The scent is pleasant to people but often less attractive to flies, especially when plants are in bloom and placed in sunny, breezy spots.
Lavender needs excellent drainage, full sun, and relatively lean soil. Heavy clay or constantly wet beds can cause root problems, so raised beds or mounded planting areas often work better.
Rosemary
Salvia rosmarinus (formerly Rosmarinus officinalis) is a woody herb with a strong, resinous scent. It is a practical choice for warm, sunny gardens and containers near outdoor living spaces.
Rosemary prefers full sun and well-drained soil. Avoid overwatering, especially in pots, because soggy roots quickly lead to decline. Prune lightly to keep plants compact and productive.
Catnip
Nepeta cataria is famous for attracting cats, but it also has a strong aroma that some gardeners use to help discourage flies. It is easy to grow and can be very vigorous once established.
Like mint, catnip can spread readily, so container growing is often the safest choice. Give it sun to partial shade and moderate watering, and trim it back if it becomes floppy.
Marigolds
Marigolds are a classic companion plant for vegetable beds and borders. Their scent is often used in fly-control planting schemes, and their bright flowers add color around entrances, paths, and seating areas.
Choose a sunny spot with well-drained soil and deadhead spent blooms to keep flowers coming. Marigolds are easy annuals, but they still need regular watering while establishing.
Scented geraniums
Scented geraniums, especially lemon-scented types, can be useful near doors, windows, and patios. Their leaves release fragrance when touched, which makes them a practical choice in places where people brush past them.
Grow them in containers or frost-free beds with good drainage and bright light. They are especially helpful where you want a decorative plant that doubles as an aromatic barrier.
How to plant them for the best fly-repelling effect
Placement matters as much as plant choice. To get the most benefit, position aromatic plants where flies are likely to enter, rest, or gather fragrance from disturbed foliage.
- Place plants near activity zones. Put pots beside doors, outdoor dining areas, trash bins, compost areas, and kitchen garden paths.
- Use clusters instead of single plants. Several containers or a dense border gives a stronger scent than one isolated pot.
- Mix heights and textures. Taller rosemary or lavender behind shorter basil or marigolds creates a fuller planting and better coverage.
- Grow in containers where needed. Pots make it easier to move plants to the most useful spots during warm weather.
- Brush the foliage gently. Light contact releases more scent, which can help in high-traffic areas.
If you are planting in the ground, prepare the bed so the roots can grow well. Most of these plants need loose soil with decent drainage, and many perform better if you mix in compost rather than heavy, wet amendments.
Growing conditions that help these plants perform well
Sunlight
Most fly-deterring herbs and flowers prefer at least 6 hours of sun a day. Basil, rosemary, lavender, and marigolds usually perform best in full sun, while mint and catnip can tolerate a little partial shade.
Soil and drainage
Drainage is critical for lavender, rosemary, and container-grown herbs. If water sits around the roots, plants weaken, and weak plants produce less foliage and scent.
Use a loose, fertile soil for basil and marigolds, and a grittier, faster-draining mix for lavender and rosemary. In heavy clay, consider raised beds, mounds, or containers.
Watering
Water based on the plant and the weather, not on a fixed schedule. Basil and marigolds usually like more consistent moisture, while lavender and rosemary prefer the soil to dry somewhat between waterings.
Container plants dry out faster than in-ground plants, especially in hot, windy weather. Check the soil with your finger before watering, and avoid keeping pots constantly wet.
Feeding
Too much fertilizer can make herbs grow fast but weak, with less fragrance. Use compost lightly at planting time, then feed sparingly unless your soil is very poor.
For edible herbs, a modest organic approach is usually enough. Strong leafy growth is useful, but overly lush, soft growth can be more prone to pests and disease.
Container planting tips for patios and entrances
Containers are one of the easiest ways to use plants that keep flies away because you can move them where they are needed most. This is especially helpful for renters, small patios, balconies, and doorways.
- Choose pots with drainage holes.
- Use a quality potting mix, not garden soil.
- Group two or three aromatic plants together for stronger scent.
- Keep containers close to where people sit or enter.
- Rotate pots if one side is getting too much shade or wind.
Mint and catnip are often best kept in their own pots so they do not spread into other containers. Lavender and rosemary may need larger pots as they mature, especially if you want them to stay healthy for several seasons.
Pruning and maintenance for stronger scent
Regular pruning helps many of these plants stay compact, leafy, and aromatic. That matters because young, actively growing foliage often gives off more scent than old, woody stems.
- Pinch basil above a leaf pair to encourage branching.
- Trim mint and catnip back when they become tall or floppy.
- Deadhead marigolds to keep flowers coming.
- Lightly shape rosemary and lavender after flowering, but do not cut into old bare wood on lavender.
- Remove yellowing or diseased leaves promptly to keep plants vigorous.
Harvesting herbs for cooking can also help. When you clip basil, mint, or rosemary, the released scent can be noticeable around the garden, and the plant often responds with fresh new growth.
Common mistakes to avoid
Many gardeners expect one plant to solve a fly problem, but the biggest gains usually come from combining plants with good sanitation and smart placement. Avoid these common errors:
- Planting in the wrong light. Shady, weak plants give off less fragrance and tend to look untidy.
- Overwatering lavender or rosemary. Wet roots lead to poor growth and fewer useful leaves.
- Letting mint spread unchecked. It can take over beds if not contained.
- Ignoring fly breeding sites. Compost, pet waste, overflowing bins, and decaying fruit can overwhelm any planting strategy.
- Using only one plant. A single pot usually has a limited effect compared with a group of aromatic plants.
Troubleshooting poor performance
Plants smell weak
If the fragrance seems faint, the plant may need more sun, better drainage, or a light trim. Many aromatic plants release more scent when the foliage is healthy and slightly disturbed.
Leaves are yellowing or dropping
This often points to too much water, poor drainage, or nutrient imbalance. Check the root zone first, especially in containers, and make sure the pot is not staying wet for long periods.
Plants are leggy and sparse
Leggy growth usually means not enough light. Move the plant to a sunnier position and prune it back to encourage branching.
Flies are still a problem
That usually means the planting is only part of the solution. Remove food scraps, clean bins, empty standing water, and keep compost managed. Plants can help, but they work best as a support, not a complete fix.
Indoor vs. outdoor use
Indoors, small pots of basil, mint, or scented geraniums can be useful near sunny windows or kitchen areas, but they need enough light to stay healthy. A weak indoor plant will not produce much scent.
Outdoors, larger groupings are usually more effective. Use containers or borders near patios, porches, and entry points where flies are most noticeable. In windy sites, place pots where the foliage is protected enough to stay dense and productive.
Final tips for a fly-friendlier garden
If you want to know what plants keep flies away, start with basil, mint, lavender, rosemary, catnip, marigolds, and scented geraniums. Then give them the right light, soil, water, and pruning so they stay healthy and aromatic.
For more practical garden guidance, you may also want to read about container herb gardening and how to improve garden drainage if those topics match your setup.