
Best Companion Plants To Repel Pests Naturally

Using Plants as a First Line of Defense Against Garden Pests
Long before synthetic insecticides became common, farmers and gardeners kept pest numbers down by growing a mix of plants. That approach is still used today — and backed by research from university entomology programs and integrated pest management (IPM) specialists. Companion planting — putting certain plants near crops to deter, confuse, or trap pests — is one of the simplest, cheapest, and most ecologically friendly tools home gardeners and small-scale growers have.
Companion planting doesn’t rely on magic. It works through everyday plant behaviors: some plants give off scents that bugs avoid or get confused by; others act as physical roadblocks; and some attract predators that eat garden pests. Knowing which plants do what — and when to time them with pest activity — makes the difference between it working well and just hoping for the best.
How Pest Lifecycles Inform Planting Timing
For companion planting to work, match your planting schedule to the pest’s life cycle. Most garden pests go through four stages: egg, larva (or nymph), pupa, and adult. Larvae usually do the most feeding damage, but adults are often more sensitive to scents from companion plants.
Take the cabbage looper (Trichoplusia ni). It spends winter as a pupa in old plant material and emerges as a moth in early spring. Females start laying eggs on brassica leaves soon after. According to the University of California Statewide IPM Program (UC IPM, 2022), egg-laying peaks when daytime temperatures stay between 60–70°F. If you plant dill or thyme two to three weeks before that window, the scent compounds will already be present when moths begin looking for places to lay eggs.
Aphids multiply fast — their numbers can double every 1.6 days at around 77°F, especially on nitrogen-rich leaves, per research cited by the Rodale Institute. Getting catnip or garlic chives in the ground before transplanting peppers or lettuce gives those plants time to build up their natural deterrents before aphid numbers climb.
Top Companion Plants and Their Target Pests
Marigolds (Tagetes spp.)
French marigolds (Tagetes patula) are among the most tested companion plants. Their roots release alpha-terthienyl, a compound toxic to root-knot nematodes (Meloidogyne spp.). A study at Wageningen University in the Netherlands found that growing French marigolds for a full season cut nematode numbers by up to 90% in badly infested soil. For this to work, marigolds need to be planted densely — not just along the edges — and left to grow for at least 60 days before the next crop goes in.
Above ground, marigold leaves give off limonene and ocimene, scents that keep whiteflies and thrips away. Plant them within 18 inches of tomatoes, peppers, or squash. Pinch off spent blooms regularly to keep the scent flowing all season.
Basil (Ocimum basilicum)
Basil is a classic tomato companion — and it’s not just about flavor. The oils in basil leaves — mainly linalool and eugenol — repel thrips, aphids, and tomato hornworm moths (Manduca quinquemaculata). Cornell University’s Department of Entomology found that planting one basil plant for every three tomato plants reduced thrips damage by about 35% compared to tomato-only plots.
Basil also draws in predatory insects, like parasitic wasps in the family Braconidae. These wasps lay eggs inside hornworm caterpillars. The wasp larvae then develop inside the caterpillar, killing it. Let some basil plants flower to boost this effect.
Nasturtiums (Tropaeolum majus)
Nasturtiums don’t repel aphids — they lure them. Aphids like black bean aphids (Aphis fabae) and green peach aphids (Myzus persicae) are strongly drawn to nasturtium leaves. Plant them around the edge of your vegetable beds to pull aphids away from your main crops. Once aphids gather on the nasturtiums, you can pull out and dispose of those plants, taking the aphids with them.
This trap-crop method is part of standard IPM advice from the Oregon State University Extension Service. They suggest checking nasturtiums twice a week during peak aphid season — usually May through July in the Pacific Northwest — and removing heavily infested stems before winged aphids appear and fly back into the garden.
Aromatic Herbs That Confuse and Deter
Many culinary herbs make volatile compounds to protect themselves from being eaten. Those same compounds throw off pests that use scent to find host plants. Planting aromatic herbs throughout your garden adds enough “scent noise” to make it harder for pests to zero in on their favorite crops.
- Rosemary (Salvia rosmarinus): Repels cabbage moths, bean beetles, and carrot flies. The camphor and 1,8-cineole in rosemary are especially useful against the carrot rust fly (Psila rosae), whose larvae tunnel into carrot roots. Space rosemary plants 24 inches apart along carrot rows.
- Sage (Salvia officinalis): Helps keep cabbage loopers and imported cabbageworms away from brassicas. Plant sage within 12 inches of broccoli, cabbage, or kale. Don’t plant it near cucumbers — it can slow their growth.
- Mint (Mentha spp.): Repels aphids, flea beetles, and ants (which tend aphid colonies). Mint spreads quickly underground, so plant it in buried containers to keep it from taking over.
- Dill (Anethum graveolens): Attracts lacewings, hoverflies, and parasitic wasps. Let dill flower to support these predators. Mature dill can stunt tomato growth, so keep it at least 3 feet away from tomato plants.
- Chives (Allium schoenoprasum): Sulfur compounds in chive leaves repel aphids, Japanese beetles, and carrot flies. They work well as a border around roses or vegetable beds.
Flowers That Attract Beneficial Predators
Companion planting isn’t just about keeping pests away — it’s also about making room for the bugs that eat them. Predatory and parasitic insects need nectar and pollen as adults, even if their young feed on pests. Planting flowers that bloom through the season helps keep those helpful insects around all summer.
Phacelia (Phacelia tanacetifolia), sweet alyssum (Lobularia maritima), and yarrow (Achillea millefolium) are top performers, according to IPM research. The University of California Cooperative Extension suggests setting aside at least 5–10% of your garden space for these flowers — and spreading them around rather than clustering them in one spot.
"Diversified plantings that include flowering species throughout the growing season can reduce pest pressure by 20–50% in vegetable systems, depending on the pest complex and the degree of landscape diversity surrounding the garden." — University of California Statewide IPM Program, Principles of Integrated Pest Management, 2022
Lacewings (Chrysoperla spp.) are especially useful. A single lacewing larva can eat up to 200 aphids a week, plus thrips, whitefly nymphs, and small caterpillars. Adult lacewings only drink nectar and pollen, so having flowering plants around is key to keeping them in your garden. Dill, fennel, and coriander are strong draws for adult lacewings.
Integrating Companion Planting with Broader IPM Strategies
Companion planting works best alongside other IPM tactics — not on its own. IPM, as used by land-grant universities and defined by the Food and Agriculture Organization of the United Nations, combines cultural, biological, mechanical, and chemical controls in a flexible way that reduces both cost and environmental impact.
When companion planting isn’t enough — say, during a heavy aphid outbreak — you can add low-impact sprays without wiping out the beneficial insects you’ve encouraged. Insecticidal soap (potassium salts of fatty acids, 1–2%) and neem oil (azadirachtin, 0.9–3%) are gentle options. Apply them in the evening, after bees and other pollinators have gone home.
Pyrethrin sprays (from Chrysanthemum cinerariifolium) knock out soft-bodied insects quickly but also affect beneficials, so save them for serious infestations. Always check your local cooperative extension’s pest threshold guidelines before using any spray — even organic ones.
Companion Planting Reference Guide
| Companion Plant | Target Pest(s) | Mechanism | Placement Recommendation |
|---|---|---|---|
| French Marigold | Root-knot nematodes, whiteflies, thrips | Root exudate (alpha-terthienyl), foliar volatiles | Solid planting, 60+ days before susceptible crop |
| Basil | Thrips, aphids, hornworm moths | Volatile oils (linalool, eugenol); attracts parasitic wasps | 1:3 ratio with tomatoes; allow to flower |
| Nasturtium | Aphids (trap crop) | Preferential host attraction | Perimeter planting; remove when infested |
| Rosemary | Carrot rust fly, cabbage moths | Volatile terpenes (camphor, 1,8-cineole) | 24-inch intervals along carrot rows |
| Dill (flowering) | Aphids, caterpillars (via predators) | Attracts lacewings, hoverflies, parasitic wasps | 3+ feet from tomatoes; allow to flower |
| Chives | Aphids, Japanese beetles, carrot flies | Sulfur compounds | Border planting around roses and vegetables |
Monitoring is central to IPM. Keep a simple garden journal: note pest sightings, rough counts, and how your companion plants are doing. The Rodale Institute (2021) recommends scouting weekly from transplant time until frost, watching for both pests and beneficials. Over time, that record helps you adjust where and when you plant — gradually shaping a garden that balances itself more each year.
Soil health matters more than many gardeners realize. Stressed plants — whether from poor nutrition or drought — give off different scents, and pests often zero in on them first. Keeping soil organic matter at 3–5% by weight (a common target from university extension programs) supports strong, healthy growth, which helps companion plants produce the scents that keep pests away.
With regular observation, smart plant choices, and timing that matches local pest activity, companion planting can cut down on pests while supporting a more diverse, resilient garden. It asks for time and attention — not expensive inputs — so it fits gardens of any size.

