How to Get Rid of Pests and Bugs in the Garden

Last updated March 7, 2025
You’ve done all the hard work: starting seeds indoors, hardening off seedlings and transplanting them into the garden. Then the deer come and wipe you out. It could be squirrels, or even creepy crawlies that attack your precious plants, too.
Here are some tips to consider when ridding your landscape of pests.
Table of Contents
Enclose Your Garden
Plant for Fragrance
Encourage Beneficial Insects
Choose Prickly Plants
Apply Diatomaceous Earth for Pesky Insects
Choose Controls
Enclose Your Garden

Go big or go home. If deer and other critters are a persistent problem, this garden enclosure may be the solution you need. Check out the details in our How to Build a Garden Enclosure guide with a video and step-by-step instructions.
Plant for Fragrance

Rabbits and deer are sensitive to scents. Plant strong-smelling rosemary, garlic and lavender near the garden to keep critters away from your vegetables and tender flowers.
Encourage Beneficial Insects

If destructive insects like aphids, Japanese beetles, caterpillars and grasshoppers are a problem, consider planning your garden with plants and practices that encourage beneficial insects. Learn more about planting for beneficials with How to Attract Beneficial Insects to Your Organic Garden.
Choose Prickly Plants

Deer and rabbits favor the tender leaves of hosta and other flowers. Plant these tasty treats in high-traffic areas near your home to keep shy critters away. When selecting plants, keep in mind that deer do not like prickly leaves or thorns.
Other deer-proofing methods, many of which are eco-friendly, include hanging bags of human hair or bars of soap near the garden. You may also consider hanging contact repellents, area repellents and electric repellents close by the garden.
Apply Diatomaceous Earth for Pesky Insects

If beetles, slugs, squash bugs and snails are a problem, consider using diatomaceous earth. This non-toxic powder kills insects within 48 hours. It’s an organic defense against ants, earwigs, silverfish, millipedes and more. Although non-toxic, consider wearing a mask to avoid breathing it while dispensing.
How to apply diatomaceous earth:
- Apply the powder throughout the garden bed and the areas surrounding it.
- Sprinkle a thick ring of powder around the base of each plant.
- Sprinkle the powder on damp or newly watered vegetable plants after excess water drips from the plants.
Choose Controls

Outdoor insecticides kill on contact and keep pests from coming back.
- Choose concentrated liquid insecticides with an applicator that simply hooks up to the garden hose. This kind of applicator ensures there’s no leftover mix.
- Yard pesticides you mix with water and apply with a portable pump sprayer create problems when you need to dispose excess product at the end.
- You may prefer to use natural, organic pest sprays that are safe for children and animals. These must be applied every 24 to 48 hours and after heavy rains. Learn more about organic solutions for your yard.
There are many approaches to control pests in your garden. An easy way to capture insects is with a trap. Place targeted pest traps 20 to 30 feet from the plants you are protecting to lure pests away from the garden.
Whether you need the right planters, seeds or potting soil, The Home Depot delivers online orders when and where you need them.