Why Some Plants Repel Pests Naturally

Plants cannot move away from threats, so many have evolved chemical defenses — volatile oils, strong scents, or compounds that insects find unpleasant or disorienting. Gardeners have long used this to their advantage through companion planting: strategically placing pest-deterring species near vulnerable crops.

The science behind companion planting varies by plant and pest. Some plants mask the scent of nearby vegetables, making it harder for insects to locate their preferred host. Others produce oils that are directly irritating or toxic to soft-bodied insects. A few act as trap crops, attracting pests away from more valuable plants. Understanding these mechanisms helps you choose plants that address the pests you actually have — not just the ones that sound impressive on a seed packet.

Before diving into the list, one important note: companion planting is not a guaranteed shield. It works best as part of a broader approach that includes healthy soil (see our guide on composting kitchen scraps into garden gold), consistent watering, and regular observation. Think of these plants as reinforcements, not replacements for good garden hygiene.

Start Small and Observe Results

If you are new to companion planting, begin with two or three of these plants rather than redesigning your entire garden at once. Plant them close to your most pest-vulnerable crops, observe what changes over the season, and expand from there. Keeping a simple garden journal helps you track what is working in your specific conditions.

Plants Worth Adding to Your Garden for Pest Control

1

Marigolds

Marigolds are among the most widely used companion plants, and for good reason. Their roots release a compound called alpha-terthienyl, which suppresses nematodes — microscopic worms that attack plant roots — in the surrounding soil. Above ground, their strong scent is thought to confuse or repel aphids, whiteflies, and Mexican bean beetles.

Plant French marigolds (Tagetes patula) directly in and around vegetable beds rather than in a separate border. They are annuals, so they require replanting each season, but they grow quickly and attract beneficial predatory insects alongside deterring harmful ones.

Marigold roots release compounds that suppress soil nematodes, making them valuable below ground as well as above.

2

Basil

Basil is a well-known kitchen herb that also pulls double duty in the garden. Its aromatic oils — particularly linalool and eugenol — are disorienting to thrips, aphids, and tomato hornworm moths, which use scent to locate host plants. Planting basil near tomatoes is a classic pairing backed by both tradition and some research into volatile plant compounds.

Keep basil plants from bolting (going to flower) as long as possible by pinching off flower buds regularly. Flowering basil still provides some benefit, but the aromatic oils are most concentrated in young foliage.

Basil's aromatic oils can interfere with pest navigation, making nearby crops harder for insects to locate.

3

Lavender

Lavender's strong floral scent, driven by linalool and camphor, repels fleas, moths, mosquitoes, and certain aphid species. It is particularly useful planted near the garden perimeter or alongside roses and brassicas, which are frequent aphid targets.

As a drought-tolerant perennial, lavender requires little maintenance once established and returns reliably each year in most U.S. growing zones (generally USDA Zones 5–9, depending on variety). It is also a powerful pollinator attractor, drawing bees that support overall garden productivity. Avoid overwatering lavender — it prefers well-drained, slightly lean soil. For more on watering nuances, our article on common garden watering myths covers frequent misunderstandings.

Lavender deters several pest types while simultaneously attracting pollinators that benefit the wider garden.

4

Nasturtiums

Nasturtiums serve a different role than most companion plants: they work primarily as a trap crop. Aphids are strongly attracted to nasturtiums, which means planting them near susceptible vegetables draws aphid colonies away from crops you want to protect. Once aphids cluster on nasturtium stems, you can remove and dispose of the affected plants or leave them to attract aphid predators like ladybugs and lacewings.

Nasturtiums are easy-to-grow annuals that thrive in poor soil with minimal fertilizer — excess nitrogen actually causes them to produce more foliage than flowers, reducing their effectiveness as a lure. Edible flowers and leaves are an added bonus for gardeners who enjoy them in salads.

Nasturtiums act as a sacrificial trap crop, drawing aphids away from vegetables you want to protect.

5

Chives

Chives belong to the allium family, whose sulfur-based compounds are known to repel aphids, Japanese beetles, and carrot flies. Planted near roses, they can help reduce aphid pressure on new growth. Near carrots, they may deter carrot rust fly, though results vary with garden conditions.

Chives are hardy perennials that spread gradually and can be divided and replanted every few years. Their small purple flowers attract beneficial insects when allowed to bloom, so consider leaving a few flower heads rather than clipping all of them back.

Chives release sulfur compounds that make nearby plants less appealing to aphids and carrot flies.

6

Dill

Dill occupies a nuanced position in companion planting. Its umbrella-shaped flowers (umbels) attract beneficial predatory insects — particularly parasitic wasps and hoverflies — that feed on caterpillars, aphids, and other soft-bodied pests. In this way, dill functions less as a direct repellent and more as a habitat plant that builds a garden ecosystem where pest pressure is naturally controlled.

One caution: mature dill can inhibit the growth of nearby carrots and is best kept away from tomatoes once it begins to flower. Plant it near brassicas, cucumbers, and lettuce instead for the greatest benefit.

Dill's flowers attract predatory insects that naturally prey on caterpillars and aphids throughout the garden.

Companion Planting Has Real Limits

Research on companion planting shows promising results for certain plant-pest combinations, but effects can vary significantly based on climate, soil type, pest pressure, and garden layout. Treat the evidence as encouraging rather than definitive, and always combine companion plants with good cultural practices — proper spacing, sanitation, and healthy soil — for the best outcomes.

Making Companion Planting Work for You

Choosing the right plants is only the starting point. How you arrange them matters just as much. Scent-based deterrents are most effective when planted close to the crops they are meant to protect — a single basil plant at the edge of a large tomato bed will have limited reach. Try interplanting throughout the bed rather than placing pest-deterring plants in a single row along the border.

Rotate companion plants each season along with your vegetables to prevent pest populations from adapting to a fixed layout. And if you are mixing perennials with annuals, understanding their growth habits will help you plan spacing and sun exposure — our overview of perennials vs. annuals is a helpful starting point. With thoughtful placement and realistic expectations, these natural allies can meaningfully reduce pest pressure in a home garden.