20 Plants That Keep Bugs Away: What Really Works
Plants that keep bugs away work in specific ways. Compare 20 herbs and flowers, see which pests they may help with, and learn what to plant first.

A pot of citronella grass or a ring of marigolds will not create a force field around your vegetables. Plants can still help manage pests, but their useful jobs are narrower: some disrupt the cues an insect uses to find a crop, some attract predators that eat pests, and some act as sacrificial plants that draw pests away. The difference matters because a plant that helps with aphids may do nothing for caterpillars or mosquitoes.
Use the list below as a set of tactics to test, not a guarantee that insects will leave. Identify the pest first, choose a plant with a plausible job, put it where that job can happen, and keep monitoring. University extension guidance stresses that companion-plant results depend on the plant, pest, crop, and layout; even a successful field pairing may not translate directly to every backyard bed. (University of Maryland Extension; University of Minnesota Extension)
What these plants can and cannot do
Aromatic leaves release volatile compounds, and a mixed planting can make a crop’s visual or chemical signals harder for some specialist insects to locate. This is a local effect, not a smell barrier that pushes every insect out of the yard; wind, plant spacing, crop density, insect behavior, and the stage of growth all change the result. Aromatic companions are most reasonable as one layer among monitoring, crop rotation, and physical protection, especially when you are growing plants you already want to harvest.
A flower may help in a different way. Small flowers provide nectar and pollen that adult hoverflies and tiny parasitoid wasps use; their larvae or offspring can then attack aphids, caterpillars, or other soft-bodied pests. An insectary plant supports that food web, but it does not repel the pest directly, and the predators need time to arrive and reproduce. Planting flower strips is therefore a preventative habitat choice, not a fast treatment for a plant already covered in insects. (UC IPM on insectary plants)
A trap crop works in the opposite direction from a repellent: it is selected because a target pest may prefer it. That can concentrate feeding or egg-laying on the sacrificial plant, but a trap crop left unchecked can also become a pest nursery. The trap needs to be more attractive at the right time, close enough to intercept the pest, and monitored so you can remove or manage it before pests spill into the crop. (University of Vermont Extension)
Aromatic companion plants may disrupt host-finding
Volatile compounds from alliums and herbs have been studied for their ability to repel aphids or make host crops more difficult to find. That does not mean the same species reliably repels every insect in an open garden. Start with a close, mixed planting near a crop you want to protect, keep the herbs healthy and in leaf, and judge the result by pest counts and crop damage rather than fragrance alone. (University of Maryland Extension)
Annual and kitchen herbs

-
Basil — Basil is worth trying beside tomatoes or peppers if you want a useful culinary companion as well as a diverse planting. University of Maryland Extension includes basil among plants whose volatile compounds may interfere with aphids and other insects locating host plants, but this is not proof that one basil pot prevents tomato hornworms or mosquitoes. Keep basil close to the crop, harvest it regularly, and let a few plants flower if you also want to feed beneficial insects.
-
Garlic — Garlic’s strong odor makes it a popular companion for strawberries, roses, and vegetables, and allium volatiles are among the compounds studied for host-finding disruption. Treat it as a small-scale companion experiment, not a substitute for checking leaf undersides or removing a real infestation. Garlic planted in a separate border may add beauty and a harvest, but distance weakens any proposed scent effect.
-
Chives — Chives fit neatly along a vegetable-bed edge, and their purple flowers give small beneficial insects access to nectar. They are part of the allium group often recommended around aphid-prone crops, but the strongest practical reason to grow them is that they take little space and can flower without taking a whole bed out of production. Cut back spent flower stalks before they spread seed where you do not want more clumps.
-
Onions — Onions and other alliums appear in companion-planting trials, including an Iowa study summarized by Minnesota Extension in which onion plantings helped reduce cabbageworm and cabbage-looper damage on brassicas. That is a crop-specific result, not a promise that onions repel carrot flies, beetles, or every insect. Give onions the sun and spacing they need, and keep a row cover ready for young broccoli or cabbage if caterpillar pressure is high.
Woody and spreading herbs
-
Rosemary — Rosemary’s aromatic foliage is a reasonable choice near vegetables if you want a perennial herb and are willing to test whether a close mixed planting changes pest pressure. Extension summaries include rosemary among plants that may make host plants harder for aphids and other insects to locate, while controlled oil studies do not prove that a rosemary shrub shields an entire bed. Give it sun and sharply drained soil; in cold or wet climates, a pot may be easier to overwinter than a garden bed.
-
Thyme — Thyme earns a place on this list because a field study summarized by Minnesota Extension found that thyme, onion, and nasturtium helped reduce cabbageworm damage in broccoli. The result is useful but specific: it does not show that thyme repels every caterpillar or protects every brassica variety. Low-growing thyme can edge a sunny bed without shading crops, and its flowers offer forage to small insects.
-
Sage — Common sage is a sturdy herb for a sunny, well-drained border, and its flowers can contribute nectar when allowed to bloom. Its scent is often presented as a broad insect deterrent, but the evidence does not justify promising protection from cabbage moths, carrot flies, or snails simply because sage is nearby. Grow it for cooking and garden diversity, then treat any change in pest damage as something to observe rather than assume.
-
Mint — Mint’s scent and essential oils are often discussed as repellents, but a living mint plant is not a dependable pest-control barrier. Its more defensible garden roles are culinary use and flowers that can support pollinators and beneficial insects. Contain it in a pot or a sunken bottomless container: mint spreads by rhizomes and can crowd out the crop it was meant to help. (RHS guidance on growing mint)
-
Lavender — Lavender attracts bees and other flower visitors, and it is useful in a sunny, dry border where you want a long-lived flowering plant. Its essential oil has been investigated for insect effects, but that does not show that a lavender shrub near a tomato or patio will repel mosquitoes or garden pests. Choose lavender for its habitat and garden value, not as a spray-free substitute for targeted pest management.
Flowers that recruit beneficial insects
The most dependable role for many pest-control flowers is to feed natural enemies, not to scare pests away. Choose open, accessible flowers and keep them blooming while the vulnerable crop is in the ground. A few flowering plants can support helpful insects, but a single flower does not ensure predators will arrive in numbers or stay where the pest is.
Small flowers for hoverflies and parasitoids

-
Sweet alyssum — Sweet alyssum has unusually good support as an insectary plant for aphid management on lettuce: its small flowers attract hoverflies, whose larvae prey on aphids. USDA Agricultural Research Service work describes how flower placement and abundance affect this system, and California research found that intercropping alyssum with organic lettuce can support aphid suppression. It is a strong choice near lettuce, but results are less predictable on other crops, and it is not an instant cure for an outbreak. (USDA ARS research on alyssum and hoverflies)
-
Dill — Dill is most useful for pest management when it flowers: its umbrella-shaped clusters provide accessible nectar for hoverflies, tiny parasitic wasps, and other insects that prey on or parasitize garden pests. You can let a few plants bolt at the edge of the bed while harvesting the rest for leaves and seeds. Do not assume dill itself repels mites or cabbage moths; it is an insectary plant, and swallowtail caterpillars may also use it as a host.
-
Cilantro — Cilantro’s small white flowers can feed beneficial insects after the plant bolts, making it useful in a bed where successive sowings leave some plants to flower. It does not have to be grown as a permanent border: keep one or two plants through bloom near vegetables, then sow another batch if the season is long. This is a low-cost way to add nectar, but it cannot replace covering a vulnerable crop when a known pest is active.
Flowers that support a diverse garden
-
Borage — Borage draws bees and other flower visitors with its blue, star-shaped flowers, and it can add a useful flowering patch beside an edible garden. Its value is habitat and pollination support rather than proven control of tomato hornworms or cabbageworms. It can self-seed and take up more room than expected, so leave space around it and pull seedlings where they compete with vegetables.
-
Calendula — Calendula, also called pot marigold, provides open flowers that attract pollinators and beneficial insects, and it is easy to tuck into a bed or container. Do not confuse calendula with French marigold: they are different plants, and the evidence for nematode suppression applies to certain Tagetes marigolds, not automatically to calendula. Use calendula to broaden the flowering season, not as a guaranteed repellent for nematodes or tomato hornworms.
Plants with a more specific pest-control job
A narrow claim is more useful than a long list of insects a plant supposedly repels. These three flowers have more distinct roles, but each role still depends on correct species, pest identification, placement, and follow-up.
French marigolds: target pests and correct timing

- French marigold — French marigold (Tagetes patula) has evidence for reducing glasshouse whitefly on tomatoes through airborne limonene, but that study does not mean any marigold border reliably protects an outdoor vegetable bed. Certain French marigolds also suppress some root-knot and lesion nematodes when grown as a dense planting for a full season before a susceptible crop; interplanting a few flowers among vegetables is much less effective, and different nematode species respond differently. If root knots are the problem, identify the nematode and use the specific marigold variety and timing recommended by local extension. (peer-reviewed French-marigold study; UC IPM nematode guidance)
Nasturtiums as monitored trap crops

- Nasturtium — Nasturtium can act as a trap crop because aphids and some caterpillars may prefer its soft leaves to nearby vegetables. Plant a small patch near, but not tangled through, susceptible crops; inspect it at least weekly and remove or manage it if pests are building faster than predators can respond. A nasturtium covered in aphids has not protected the garden unless you keep those aphids from spreading back to the crop. For brassicas, row covers remain a more dependable barrier against egg-laying butterflies. (University of Vermont Extension on trap crops)
Chrysanthemums and the limits of pyrethrins
- Chrysanthemum — Pyrethrins, natural insecticidal compounds, come from certain chrysanthemum flowers, especially Chrysanthemum cinerariifolium. A living florist’s mum does not release a crop-protecting dose into the garden; commercial pyrethrin products are processed pesticides with directions and risks of their own. Pyrethrins can be highly toxic to honey bees, so do not treat “plant-based” as harmless or make a homemade spray from flowers. (National Pesticide Information Center on pyrethrins)
Mosquito plants need a reality check
Mosquitoes are not garden pests in the same sense as aphids on a crop: they bite people and can transmit disease. Some plants contain compounds studied for repellent products, but the living plant sitting nearby is not equivalent to a measured, formulated repellent. Iowa State Extension says that citronella grass, scented geranium, lemon thyme, and similar plants do not repel mosquitoes simply by sitting on a patio. (Iowa State University Extension; The Old Farmer’s Almanac on mosquito-repellent plants)
Lemongrass and citronella grass
-
Lemongrass — Culinary lemongrass (Cymbopogon citratus) is a warm-weather ornamental and kitchen herb with a lemon scent, but planting it around a chair does not create reliable mosquito protection. Its oils are different from the idea of a live “mosquito plant,” and any repellency claim about a concentrated extract should not be transferred to the unprocessed plant. Grow it for cooking or foliage where it suits your climate; move it indoors or treat it as an annual where winter cold is a problem.
-
Citronella grass — True citronella grass (Cymbopogon nardus or C. winterianus) is grown as a source of citronella oil used in some repellent products. It still does not repel mosquitoes just by growing near a person, and crushing leaves does not make a tested product with known protection time or skin safety. If mosquito bites or disease risk matter, use a repellent recommended by public-health guidance rather than relying on any patio plant.
Catnip compounds versus a living plant
- Catnip — Catnip contains nepetalactone, which has shown mosquito-repellent effects in laboratory and product studies. A 2026 field study tested lotion made with concentrated catnip essential oil; it did not test whether a catnip plant in a yard prevents bites. Catnip leaves, a catnip pot, and a formulated lotion are not interchangeable. Keep cats in mind too: many are attracted to the plant and may flatten it. (2026 field study of catnip-oil lotion)
If you need protection from bites, the CDC recommends EPA-registered insect repellents and removing standing water where mosquitoes lay eggs. It specifically says the effectiveness of non-EPA-registered repellents is not known. Plants can add interest to a patio, but they should not be your protection plan when mosquito-borne disease is a concern. (CDC mosquito-bite prevention)
Match the plant to the pest
Start with the crop and the visible damage, then pick the plant role that best matches it. This quick guide keeps the recommendation proportional to what the evidence supports.
| Problem | Plant-based option worth trying | What to do alongside it |
|---|---|---|
| Aphids on lettuce | Sweet alyssum flowering near the crop | Preserve hoverflies and parasitoids; check leaf undersides and remove heavily infested leaves. |
| Cabbageworms on broccoli or cabbage | Thyme, onion, or nasturtium as a small companion trial | Use row cover before butterflies lay eggs; inspect undersides for eggs and larvae. |
| Whiteflies on tomatoes | French marigolds as one part of a diverse planting | Confirm whiteflies, monitor leaf undersides, and avoid assuming one marigold protects a whole bed. |
| Root-knot nematodes | A suitable French marigold cultivar as a full-season cover before the crop | Confirm the pest and local species; a few interplanted marigolds will not clean infested soil. |
| Mosquitoes near a patio | No plant is a dependable substitute | Empty or scrub water-holding containers weekly and use an EPA-registered repellent when needed. |
Once you choose one plant, make a small test rather than redesigning the whole garden. Plant it near a crop with a known, recurring pest; leave a similar section without the companion if you have room; then compare pest counts and damage over the same weeks. Record what you see, including weather and whether the plant flowered. This will not replace a controlled trial, but it can tell you whether the plant is earning space in your own garden.
For aphids and caterpillars, scout the crop as well as the companion. A trap plant needs inspection; an insectary flower needs time and bloom; an aromatic plant needs to be close enough to change the mix of cues around the crop. Keep targeted options ready—hand removal, row covers, pruning, or an appropriate labeled treatment—so a promising companion does not become an excuse to let damage spread.
Common mistakes that waste a season
Planting by pest reputation instead of pest identity is the most common mistake. “Bugs” could mean aphids, thrips, root-knot nematodes, mosquitoes, or beneficial insects. A plant that supports hoverflies may help with aphids on lettuce but will not stop squash bugs, and a marigold’s possible nematode role is underground rather than a general defense against insects in the air.
Putting one plant too far from the crop can make a scent-based effect unlikely. If you want to test aromatic companions, interplant or place them at the crop edge instead of relying on a distant pot. Conversely, avoid letting a trap crop touch the plant you want to protect: pests and larvae can move between tangled foliage.
Letting a trap crop go unmanaged can increase rather than reduce trouble. Check it on a schedule; if pest numbers rise and there are no predators or parasitoids keeping pace, remove and dispose of the heavily infested plant rather than leaving it as a breeding site. For a small garden, a row cover over the crop may be simpler and more predictable.
Treating a pesticide as harmless because it came from a plant also creates risk. Pyrethrins are plant-derived, but they are insecticides and can kill pollinators exposed to them. Use any pesticide only for a confirmed problem, follow its label, and avoid spraying blooming plants or active pollinators.
Finally, do not expect a scent to protect people from mosquitoes or to protect every plant from all pests. Plantings are long-term garden design; bite prevention and active crop protection require methods chosen for the actual risk. The best companion plants are those that also fit your soil, climate, food uses, and garden layout even if their pest-control effect is modest.
Conclusion
Plants can make pest management more resilient when they have a defined job: herbs may complicate host-finding, French marigolds can help with specific nematodes under the right conditions, nasturtiums can divert selected pests, and flowering plants can feed predators that attack aphids. None is a universal repellent, and several famous mosquito claims confuse an essential oil or pesticide with a living plant. Identify the pest, start with one evidence-backed pairing, monitor it, and combine it with the targeted control the crop actually needs.



