Learn which plants thrive in your Hardiness Zone with our new interactive map!

How to Keep Pests Out of a Vegetable Garden

By Barbara Fahs ; Updated September 21, 2017

You have worked hard to plant your vegetable garden, so it’s discouraging when you find that insects, birds, rabbits, gophers or deer have beaten you to the harvest. Whatever the pest that is plaguing your garden, there is a solution, because, after all, we humans are supposed to be smarter than those bugs and other critters. But the animals are also smart and have devious ways of finding enough food to keep them alive and well.

Keeping Pests Out of Your Vegetable Garden

Control many insects by spraying with insecticidal soap, which you can make or purchase (see Tips). Watch for ants because they can indicate the presence of aphids and scale insects, and perhaps control them with by smearing “Tanglefoot” around the base of each affected plant according to label instructions. Control snails with iron phosphate granules, sold as “Sluggo.”

Prevent birds from eating your ripening veggies by draping special netting over your plants. Hanging “flash tape” around your garden can be effective in scaring birds away.

Watch for rabbits at dawn and dusk to determine if they are the thieves who are reducing your vegetable harvest. Remove nearby piles of brush and clear weedy areas where rabbits can find a hiding place. If you build a fence of hardware cloth that is just 18 to 20 inches tall and surround your target plants with it, rabbits won’t be able to get into the area. Be sure to bury the wire two to three inches deep all the way around the area.

Keep gophers from eating the roots of your tomatoes and other plants by building wooden frames with poultry wire or a double thickness of narrow-gauge chicken wire attached to the bottom. You’ll need to build them before you plant your vegetables, then fill them with soil and plant your plants as usual. Two by six boards work well.

Keep deer out of your vegetable garden by building a six-foot fence around it. Because deer can jump, it’s important to build your fence at least six feet high. Be sure to include a secure gate because these creatures can find their way into a garden if they smell a delectable veggie they can’t wait to eat. See Tips for plants that can repel deer.


Things You Will Need

  • Insecticidal soap
  • Iron phosphate granules ("Sluggo")
  • Tanglefoot
  • Netting
  • Flash tape
  • Wooden boards
  • Poultry wire or hardware cloth
  • Repellent plants


  • Some plants are said to deter deer from the area in which they are planted. Plants that are believed to repel deer include red buckeye, mini mallow, white sage, asparagus fern and many others (see Resources).
  • Make a soap spray for insects by mixing 1 tablespoon of Ivory Liquid dish detergent in a 1-quart spray bottle and then fill it with water. Spray your plants thoroughly, including the undersides of the leaves and repeat daily until you see no more insects.

About the Author


Barbara Fahs lives on Hawaii island, where she has created Hi'iaka's Healing Herb Garden. Fahs wrote "Super Simple Guide to Creating Hawaiian Gardens" and has been a professional writer since 1984. She contributes to "Big Island Weekly," "Ke Ola" magazine and various websites. She earned her Bachelor of Arts at University of California, Santa Barbara and her Master of Arts from San Jose State University.