10 plants to help keep pests out of your vegetable garden

Aside from looking beautiful, flowers and other plants can bring added benefits to your vegetable garden. By mixing the following plants in with your tomatoes, cucumbers, and squash, you’ll have a bit of natural help in preventing pests from infecting your garden. Best of all, they’re a natural prevention that will hopefully limit how much insecticide you end up needing to use should the bugs start to take over a plant.


Marigolds are great for helping repel aphids and mosquitoes, as well as small animals like rabbits. Because they’re on the smaller side, they can easily be mixed throughout your garden without too much concern about them getting too big.

To be their best and happiest selves, marigolds should be planted in a location with full sun. They aren’t too picky and will grow in any decent garden soil, so long as it’s not too acidic and they get watered fairly regularly. Marigolds don’t like to be left in dry soil for more than a couple days, especially during the hotter parts of the season; however, once they’re established in your garden, they can be somewhat drought tolerant. You just won’t see as many blooms if you forget to water them.

A bunch of pink petunia blooms


Petunias help repel aphids, asparagus beetles, leafhoppers, squash bugs, and tomato hornworms. If you love growing tomatoes, you can plant petunias alongside basil interspersed throughout the tomatoes to increase natural pest prevention.

A majority of petunias prefer at least six to eight hours of sun a day; however, in the hottest part of the summer, partial shade can be beneficial to help keep blooms looking happy and healthy. They enjoy a well-draining soil and don’t like to dry out too much between waterings. You should aim to not let the soil dry out more than two inches while taking care not to overwater.


Geraniums can repel leafhoppers and other types of insects. When taken care of properly, they’ll reward you with beautiful blooms and add a lovely pop of color to an otherwise mostly green garden.

Geraniums can grow happily in full sun to partial shade locations. The best environment for blooming is one that gets full sun in the mornings and evenings but has partial shade provided at the hottest point of the day. They are relatively drought-tolerant and can be dry for a couple days before showing many adverse effects.


Lemongrass plants help repel mosquitoes, which makes working in the garden a nicer environment –– especially during the more humid days when bugs are out in abundance. Nobody wants to get bitten to pieces while tending to their veggies, so this plant is really more for you than it is for the health of your crops.

Lemongrass prefers full sun locations and will actually attract pests when planted in shade. Keeping the soil moist will result in the best growth, as lemongrass’ natural environment is one that’s hot and humid. Plant lemongrass outdoors around the same time you would plant tomato plants.


Rosemary is another plant that helps repel mosquitoes and other insects. At the very least, it will make your gardening environment more pleasant (and when it comes time to harvest, you’ll have some nice, fresh herbs for garnishing your dishes).

Rosemary care is relatively simple. Like a lot of herbs, it does best in full sun and well-draining soil. Rosemary should be watered when the soil is dry. Other than that, it can tolerate a range of humidity as well as high temperatures.


Nasturtiums can potentially repel aphids, cabbage loopers, squash bugs, whiteflies, and a variety of beetles.

Nasturtiums grow best in full sun locations, though they can tolerate a little shade (especially when it protects them from afternoon heat). They like well-draining soil and prefer an average amount of water, but they can tolerate dry soil for a day or two.

A beautiful yellow chrysanthemum


Chrysanthemums (or mums) are great for repelling ants, cockroaches, Japanese beetles, ticks, and more. This flower can help repel bugs that others don’t, and they may be good to plant alongside ones like petunias or marigolds to cover a wide variety of pests.

Chrysanthemums bloom and thrive best with six to eight hours of sunlight per day; however, they can grow in partial shade locations. They prefer having an evenly moist soil and hate soggy roots. Avoid planting these flowers near night lights or other artificial lighting as that can actually affect their blooming cycle.

Pitcher plants

As opposed to repelling pests, pitcher plants are actually carnivorous plants that trap and eat insects. These plants are great to have in your garden if you’re within their growing zone (USDA zones 6 through 8) because they’ll help take care of the bugs that make their way in despite all your preventative measures.

The pitcher plant, like most carnivorous plants, do best in full sun locations. You’ll know if your pitcher plant isn’t getting enough light when the leaves or pitchers start to droop. These plants prefer a moist, well-draining soil. Take caution not to drown your plant while remembering that they don’t like to dry out much. For pitcher plants, it’s important to water the whole plant (not just the base) so that the pitcher and leaves also get some moisture.


Alliums are great for repelling aphids, cabbage worms, carrot flies, and slugs. The beauty of a lot of these plants is that sometimes there’s overlap in the pests they deter, and sometimes you can plant a variety to help keep away a large number of pests instead of just a few.

The healthiest alliums will love six to eight hours of sun per day. They can grow in partial shade, but their growing seasons are quite short. If you want the best results outside of just pest prevention, sunny spots will be much better for these plants. Alliums hate staying wet for too long, especially during dormancy, so take care to plant them in well-draining soil and water infrequently.

Garlic chives

Garlic chives are another great plant to pair with tomatoes, as well as carrots and roses. Not only do they help deter Japanese beetles from infesting your garden, but they can also help prevent black spots on your roses!

Garlic chives grow fine in partial shade, but they’ll thrive in full sunlight. They prefer a dry to medium soil that drains well, and although they can be drought tolerant, you’ll find that your garlic chives do much better when the soil is kept moist (not soggy). Flowers should be deadheaded before they go to seed if you aren’t interested in natural spread.

Not all insects will harm your garden

As mentioned earlier with marigolds, some plants will actually help bring beneficial insects to your vegetable garden. The flowers that help keep pests away will have a hand in attracting additional pollinators, which may end up resulting in a larger harvest for you. There are also many that attract bugs who eat pests, and those are equally as valuable to the average gardener as the rest of these. Veggie gardens don’t have to be strictly vegetables, and mixing in these flowers and plants will give your plot some pops of color and some added interest.

Editors' Recommendations