How to Use Garlic As Pest Control in the Garden

There are lots of gardening practices that we follow without knowing whether they truly work or not.

My mom taught me to spray my zucchini with a water and milk mixture to prevent powdery mildew, and I have always done it without questioning whether it’s based on good science or not.

Turns out it is, but it could just as easily have been a gardening myth.

A close up vertical image of a pile of garlic cloves in a a wicker basket. To the top and bottom of the frame is green and white printed text.

We link to vendors to help you find relevant products. If you buy from one of our links, we may earn a commission.

Take lining the bottom of a container with rocks, staking young, newly-planted trees, or using coffee grounds to alter soil pH. All of these practices have been (and continue to be) incredibly popular and all of them have been at least partially debunked.

We live and learn, and what was once considered a smart practice may eventually become recognized as outdated when new information presents itself.

So what about using garlic in the garden, either as a spray or by companion planting, also known as intercropping? Many of us rely on garlic to help control pests, but does it actually work, or are we just convincing ourselves it does?

Turns out, the practice is backed by some pretty good science. We’ll go over that and the best methods for using the marvelous stinking rose as pest control, coming right up.

Here’s what you can expect in this guide:

I love garlic (Allium sativum). When it’s growing in my garden, I don’t have to worry about vampires sneaking up on me, it’s phenomenal in a huge variety of dishes, and its presence makes it easy to keep my garden healthy.

Ready to incorporate more of this tasty allium into your world? Awesome, let’s go!

The Science Behind Garlic-Based Pest Control

There have been quite a few studies on the efficacy of garlic since the 1970s when people started looking for an alternative to DDT in the wake of the seminal book “Silent Spring” by Rachel Carson.

Most studies look at extracts and essential oils, but some look at intercropping as well.

A close up horizontal image of garlic cloves in a glass jar covered with oil or water or some other liquid set on a wooden surface.

If you’ve ever nibbled on a bit of a raw clove, then you know it’s pretty pungent. That can be off-putting to many humans and other animals, as well as many types of insects.

If you’ve ever wondered what makes A. sativum so strong, it’s all the sulfur compounds that it contains.

For those who have visited Yellowstone National Park, the Sulphur Caldron gives you a pretty good idea of what sulfur smells like and why it can be so off-putting.

A horizontal image of Sulfur Caldron in Yellowstone National Park.

The first time I visited the spring I thought I had mistakenly walked through the gates of hell. And yet I always triple the amount of garlic a recipe calls for. Go figure!

What was I talking about again? Oh right.

The primary compounds in A. sativum are about 20 percent dimethyl trisulfide, 19 percent diallyl disulfide, 13 percent diallyl sulfide, and 11 percent diallyl tetrasulfide.

Certain insects find this combination of compounds to be repellant, while it can actually be toxic to others. A few insects, like allium leaf miners (Phytomyza gymnostoma), are drawn to the scent – and I personally can’t blame them!

It’s toxic to yellow mealworm larvae (Tenebrio molitor), as detailed in the results of a study published in the journal Nature in 2017.

A research team at the Universidade Federal de Vicosa in Brazil studied the effects of the essential oil on these common insects and found that the mealworms were rapidly killed by the oil.

A study published in Crop Protection, also in 2017, by researchers with the Agricultural Entomology department at the University of Tehran, found that spined soldier bugs (Podisus maculiventris) were killed by A. sativum extract.

A close up horizontal image of three gardeners tending to their garlic crop in a raised bed.

When it comes to intercropping, the results of a study published in 2014 in the IOSR Journal of Agriculture and Veterinary Science and conducted by researchers at the Department of Agricultural Management and Zimbabwe Open University found that garlic and onion plants placed near cole crops helped to reduce pest infestations.

Garlic has also been found to be effective against gall midges (Camptomyia corticalis) and cabbage fly (Delia radicum) adults and eggs, but not the larvae.

And the good news keeps coming! Let’s review a bit more of the available research.

Tobacco plants (Tobacum nicotiana) that were interplanted with garlic showed a lower incidence of green peach aphids (Myzus persicae).

If you’re an avid gardener, you probably know from personal experience how common this particular species of aphid is in the garden and how nice it is to have something available to up your chances of repelling them.

The marvelous stinking rose is also effective at repelling sweet potato whiteflies (Bemisia tabaci), apple ermine moths (Yponomeuta malinellus), pine processionary moths (Thaumetopoea pityocampa), common cutworms (Spodoptera litura), and two-spotted spider mites (Tetranychus urticae).

A highly magnified image of tiny spider mites feeding on a leaf.

Have you struggled with nematodes? Some species, including the dreaded root-knot nematodes (Meloidogyne incognita), were decimated by garlic extract and repelled by interplanting. So were some species of slugs.

But this awesome allium isn’t a miracle solution to get rid of all the creepy-crawlers eyeballing our crops.

It doesn’t appear that it works well against mosquitos or rosy apple aphids (Dysaphis plantaginea). Silverleaf whiteflies (Bemisia argentifolii) also seem to be unimpressed by allium intervention.

Sadly, it is hit or miss in studies analyzing its effectiveness against beetles and weevils in the Coleoptera order, which sucks because this order includes mountain pine beetles, click beetles, blister beetles, and potato beetles – all common garden pests.

The jury is still out as to whether garlic can effectively deter mammals like rabbits, rodents, and deer.

Some rabbits and deer will consume the tops, but it appears that most will avoid the bulbs. Intercropping probably won’t keep mammals out of your garden, but the scent of the spray might keep them from chowing down on a plant.

Make Your Own Garlic Repellent or Insecticide

Creating a DIY garlic spray is as easy as… well, not pie. How about as easy as adding garlic to your favorite pasta dish?

Grab yourself a head, separate the cloves, and remove the papery skins.

If you hate removing the skin as much as I do, place the cloves in a glass jar or bowl and cover it with another glass jar or bowl of the same size. Shake vigorously to knock all the skin off.

Toss all the cloves into a blender with two cups of water and blend away until everything is pulverized.

A close up top down view of Allium sativum in a small blender set on a wooden surface.

Take some cheesecloth and place it over a bowl. Pour the mixture into the cheesecloth, close it up with the garlic inside, and squeeze, squeeze, squeeze.

If you hate the smell of garlic on your hands, either wear gloves as you squeeze or make a baking soda paste with a little water and rub it all over your hands to wash off the smell when you’re done.

Once you’ve wrung all the juice out of the pulp (and washed your hands), pour the liquid into a spray bottle. Now you have your garlic spray.

Test a little spray on a small section of your infested plant or one that you wish to protect from pests before you drench the whole thing. Let it sit for 24 hours. If everything looks good and there is no sign of damage like yellowing or brown leaves, go ahead and treat the whole plant. 

Spray the tops and bottoms of the leaves and the stems. Repeat every two weeks, or reapply sooner if it rains.

You can also use the spray as a soil drench. Just pour it on the soil inside the drip line of your plant.


Planting garlic near other crops to repel pests is a smart strategy. Not only does the allium keep bugs away, but it can also keep some weeds at bay. Plus, the effects can last for weeks after the garlic is harvested.

A close up vertical image of a mixed vegetable bed.

Companion planting isn’t an exact science. Feel free to experiment with distances. I have a two-by-four-foot raised bed and I plant a row of garlic on one short side.

If you plant in rows in the ground, try to interplant with alliums in every two or three rows. If you use the square-foot gardening method, plant garlic every few feet.

In the study mentioned above on intercropping with cole crops, researchers found planting rows of alliums between rows of cabbages worked best, rather than interspersing their plantings within rows.

But that doesn’t mean it’s the only way to get the job done.

Find what works best for you and your specific crops, and don’t be afraid to experiment. Remember to keep notes on what worked and what didn’t in your gardening journal.

Garlic Stinkin’ Rocks in the Fight Against Pests

Some organic gardening strategies are, shall we say, less than effective. But using garlic against pests stands up to scientific scrutiny. It’s an effective way to repel and kill many different types of pests.

A close up horizontal image of a pile of garlic cloves in a wicker basket pictured on a soft focus background.

We can’t wait to hear how you put this powerhouse to work in your garden. If you opt to go with intercropping, let us know what method works best for you. Share your experiences in the comments so we can spread the word!

Are you looking for more information about growing garlic in your garden? If so, check out these guides next:

Photo of author
Kristine Lofgren is a writer, photographer, reader, and gardening lover from outside Portland, Oregon. She was raised in the Utah desert, and made her way to the rainforests of the Pacific Northwest with her husband and two dogs in 2018. Her passion is focused these days on growing ornamental edibles, and foraging for food in the urban and suburban landscape.

Wait! We have more!

Notify of

Newest Most Voted
Inline Feedbacks
View all comments
lirpa (@guest_31164)
10 months ago

Inter-planting works for sure. Every year I plant a row of garlic in my 2.5 by 12 raised beds. Last year I did not because we were making new bed frames. I had horrible flea beetle problems and ended up replanting my beans and tomatoes and spraying them every day with insecticidal soap. This year, I had a row of garlic in each bed. There were a few flea beetles but nothing like last year. The cutworms got a few of my beans, but no flea beetles at all.

Allison Sidhu
Allison Sidhu(@allison-sidhu)
Reply to  lirpa
10 months ago

Excellent, thanks for sharing!

Thomas Baer
Thomas Baer (@guest_44434)
13 days ago

I read that the reason you don’t ever see mosquitoes, flies and bugs at the Disney Properties is because they use a pure garlic to water only mixture in their sprayers … the Disney “Bug” guy in the article said that they use only garlic and water and that chases away any insects crawling or flying and that it is so light that people can’t even smell the garlic … I’m in Arizona and we have tons of bugs of all kinds and I’m trying it out now … being that Disney didn’t give out the recipe I have to… Read more »