Herbs

Companion Planting Herbs That Actually Repel Garden Pests

Learn which herb companion pairings have real evidence behind them for deterring pests, and which popular pairings are just garden folklore.

By The Rooted Almanac Team

Why companion planting works for some pairings and not others

Companion planting has been passed down through gardening lore for generations, and some of it holds up under scrutiny while a lot of it does not. The pairings that actually work tend to fall into one of three categories: plants that mask the scent cues pests use to find their target crop, plants that lure pests away from what you actually want to protect, and plants that attract the predatory and parasitic insects that eat garden pests for you. Once you understand which mechanism is at play, you can tell the difference between a pairing worth planting and one that is mostly wishful thinking.

What companion planting is not is a forcefield. No herb, planted anywhere near a vegetable, will eliminate a pest population outright. The realistic goal is disruption: making it a little harder for pests to locate your crops, and giving natural predators a reason to stick around your garden instead of passing through. Treat these pairings as one layer in a broader pest management approach that also includes healthy soil, crop rotation, and hand-picking or row covers when pressure gets high. For pairings beyond herbs, our vegetable garden companion planting chart maps out which plants help each other.

Scent-masking herbs: basil, sage, and catnip

Many pest insects, particularly aphids and certain moths, find host plants by following volatile chemical signals released by the leaves. Strongly aromatic herbs planted close to a susceptible crop can partially mask those signals, making it harder for pests to zero in. Basil interplanted with tomatoes is one of the more commonly cited examples, and while it will not stop a determined hornworm, gardeners and some small trials report reduced aphid and thrips pressure when basil is planted densely around tomato beds rather than as a single token plant.

Catnip contains nepetalactone, a compound that has been shown in research settings to repel a range of insects including aphids, flea beetles, and even cockroaches, at concentrations far more effective than many synthetic repellents by weight. The catch is that catnip spreads aggressively and will take over a bed if left unchecked, so most gardeners get better results growing it in containers positioned near vulnerable crops rather than in the open ground.

Sage, thyme, and rosemary work on a similar principle. Their strong essential oils are believed to disrupt the ability of cabbage moths and certain beetles to locate brassicas by scent, which is why you will often see them tucked into the edges of cabbage and broccoli beds in traditional kitchen gardens.

Trap cropping: nasturtiums and aphids

Nasturtiums are one of the best-documented companion plants in home gardening, though they work through trap cropping rather than repellence. Aphids are strongly attracted to nasturtiums, often preferring them over nearby vegetables. Planted as a border around beans, squash, or brassicas, nasturtiums draw aphids toward themselves and away from your food crops. The tradeoff is that you need to monitor the nasturtiums and either accept some sacrifice foliage or remove heavily infested growth before the aphid population builds up enough to spill over onto neighboring plants.

This same trap-cropping logic applies to a few other pairings, though nasturtiums remain the most reliable and easiest to work into a small garden because they tolerate poor soil, need little care, and produce edible flowers as a bonus.

Attracting predators: dill, fennel, and cilantro

The most consistently effective herb strategy is not repelling pests directly but recruiting the insects that eat them. Dill, fennel, cilantro, and parsley all produce small clustered flowers, called umbels, that are especially attractive to parasitic wasps, hoverflies, and ladybugs once the plants bolt and flower. Parasitic wasps lay eggs inside aphids, caterpillars, and other pests, while hoverfly larvae and ladybugs consume aphids directly and in large numbers.

To get the pest-control benefit from these herbs, you have to let a portion of them flower rather than harvesting every leaf. Letting a few dill or cilantro plants bolt at the edge of a vegetable bed, rather than treating bolting as a failure, is what actually invites the beneficial insects in. This is a slower strategy than trap cropping or scent masking, since it takes a season or two for predator populations to build, but it compounds over time and benefits the whole garden rather than one bed.

Herbs with weaker or mixed evidence

Not every popular companion herb has strong evidence behind it. Chives and other alliums are frequently recommended near roses and carrots for their sulfur compounds, and while there is some indication they may deter aphids and carrot rust fly at close range, the effect is inconsistent across studies and appears to depend heavily on planting density. Mint is often suggested as a cabbage moth deterrent, and its strong scent may offer a mild masking effect, but mint’s invasive root spread usually causes more problems than the pest benefit is worth, so it belongs in a container rather than an open bed if you grow it for this purpose.

Oregano and thyme are sometimes credited with broad pest-repelling powers, but most of the supporting evidence comes from concentrated essential oil extracts used in laboratory pest trials, not from the diluted scent of a living plant in open garden soil. Growing them is still worthwhile for cooking and for drawing pollinators when they flower, just do not expect a living thyme border to function like a pesticide barrier. Whether you start these herbs from seed or buy starter plants depends on how many you need to ring a bed.

Common companion planting myths to skip

A few widely repeated claims do not hold up. Planting garlic as a universal pest deterrent scattered throughout a vegetable garden has little support beyond localized effects on a small number of pests, and it will not protect an entire bed from general insect pressure. The idea that marigolds repel aboveground pests through scent is also overstated; the real, well-documented benefit of certain marigold varieties is suppressing root-knot nematodes in the soil, which is a different mechanism than repelling flying or crawling insects. And no single companion herb, no matter how aromatic, will substitute for basic pest management practices like removing diseased foliage, watering at the soil line instead of overhead, and inspecting plants regularly during peak pest season.

Quick recap

  • Scent-masking herbs like basil, catnip, and sage can make it harder for pests to locate host plants by smell, especially when planted densely rather than as single specimens.
  • Nasturtiums work as a trap crop, pulling aphids away from vegetables, but need monitoring so the infestation does not spread back.
  • Letting dill, fennel, cilantro, and parsley flower attracts parasitic wasps and other predators that control pest populations over time.
  • Chives, mint, oregano, and thyme have weaker or mixed evidence as pest deterrents and are better grown for their culinary and pollinator value.
  • Skip the myths: garlic is not a universal repellent, and marigolds help mainly with soil nematodes, not airborne or crawling insect pests.
companion plantingherb gardeningpest controlorganic gardeningnasturtiumsbasilbeneficial insects

Related guides