13 Ways to Keep Animals Out of Your Garden Without Harming Them

Use deterrents—not poisons or traps—to keep wildlife from eating your garden bounty.
A cottontail rabbit eats a marigold from a planted garden.
Photo: Mint Images via Getty Images

We may earn revenue from the products available on this page and participate in affiliate programs. Learn More ›

If your garden is your pride and joy, you can get exceedingly frustrated when animals nibble on your plants and ripening fruit, or dig around and make a mess. While there are many ways to keep animals out of the garden, fewer options ensure that you don’t hurt or kill bunnies, squirrels, moles, birds, or raccoons in the process. Many natural pest control methods can block or deter animals from your garden, and they can be just as effective as poisons and traps.

Your first step in learning how to keep animals out of the garden is to identify your animal adversary. Then combine that knowledge with the humane animal deterrents below to help accomplish your goal of growing healthy plants while encouraging animals to stay away from your flowers, fruits, and vegetables without harming local wildlife.

1. Use ultrasonic pest repellents.

A green ultrasonic pest repellant stands in a garden bed with mulch.
Photo: Lowe’s

An effective way to keep raccoons, skunks, deer, foxes, dogs, cats, and other animals away from your garden beds is to use an ultrasonic pest repellent, much like those that can control pests indoors. Ultrasonic pest repellents like this Broox solar animal repellent have strobe lights and play high-frequency sounds when activated by an animal’s motion. The noise and lights scare animals away and, with a few exposures, can condition them to keep their distance from your plants.

2. Install garden fencing.

A mesh garden fence protects yellow flowers from garden pests.
Photo: Lowe’s

Building a fence around the garden might solve your pest problem and protect your plants. You’ll need to determine the ideal height for the fence based on the type of critters that have been getting into your garden. For example, if you’re only dealing with rabbits, squirrels, or other small garden animals, a short fence will likely suffice. However, if you want to repel deer or other large animals, opt for fencing that’s at least 5 feet tall, like this Sta-Green black plastic mesh fencing

3. Install an underground barrier.

A mesh chicken wire fence planted in-ground to protect a small garden from pests.
Photo: Philippe Gerber via Getty Images

If your problem critters live underground (like moles and gophers), you can dig a trench and fence the garden underground with mesh hardware cloth like SEBOSS galvanized ¼ inch mesh. Dig a trench 2 feet deep, and bury the mesh vertically so that it sticks up about 6 inches. If you have to keep deer and gophers out of the garden, this might require placing both underground and above-ground fences close together. You can also lay a horizontal galvanized mesh barrier under the garden bed, but it should be laid at least 12 inches deep. Place the barrier at ground level for raised beds at least a foot high. 

4. Place mint in or near the garden.

Assorted mint plants in a garden bed.
Photo: Penpak Ngamsathain via Getty Images

Deer, insects, and some other outdoor pests do not like the smell or taste of mint. If they smell mint while scoping out your garden, they’ll likely try to get away from the scent. There are a few different ways you can use mint to keep animals out of gardens. These include planting a mint border around the garden; planting peppermint alongside pest-targeted plants; scattering Pure Mint herbal tea bags around the area; or spraying Mighty Mint Rodent Repellent, which contains peppermint essential oil, on fencing, rocks, or other hard surfaces. 

Just beware that mint spreads easily, and will need some maintenance or planting in buried plastic containers to prevent it from invading other plants.

5. Spray castor oil around the garden.

A vial of castor oil sits next to beans and plants.
Photo: CUNDO via Depositphotos

Many burrowing garden pests, such as skunks, ground squirrels, gophers, moles, and voles, do not like the way castor oil tastes. To use castor oil as a burrowing pest repellent, combine 3 tablespoons of an organic product like Botanic Hearth Castor Oil, 1 tablespoon dish soap, and 1 gallon of water to make your own homemade spray or follow the directions for a commercial spray like Petra 100 Percent Castor Oil for Moles and Voles. Spray the solution in areas around the garden and anywhere else you’ve noticed pests in your yard, and be sure to spray about every 10 to 14 days or after heavy rains.

6. Cover individual plants with wire cloches.

A small plant covered by a wire cloche.
Photo: DOUGLAS SACHA via Getty Images

Wire cloches are a practical solution if garden pests seem to be targeting just a few of your plants in particular. They also can help ensure that new plants get off to a good start without chewing or stepping damage. Simply place plant protectors like these Premlity rust-free garden cloches, made from iron and chicken wire, over tender or targeted plants in your garden. Be sure to secure them with garden stakes or staples like FEED 6-inch galvanized garden staples. They’ll help keep animals like rabbits and deer from reaching past the protective barrier to nibble on leaves and stems.

7. Sprinkle cayenne pepper around plants.

Dried cayenne peppers.
Photo: ALEX TREADWAY via Getty Images

Even if you’re unsure of what type of animal is digging holes in your yard, try keeping them away using cayenne pepper or a capsaicin-based commercial repellent. Cayenne pepper scent is among those that deter garden pests. Many critters, including raccoons and squirrels, do not like its spicy taste. If you sprinkle cayenne pepper over and around the plants that you want to protect, animals are sure to quickly change their minds after biting into unexpectedly hot greens. However, know that capsaicin can harm some animals if it gets into their eyes or respiratory tracts, and it is toxic to bees, so use it sparingly. 

8. Produce noise when animals appear.

Wind chime hung above a fenced-in garden and flower bed.
Photo: Arman Zhenikeyev via Getty Images

When garden pests won’t leave your fruits, vegetables, and flowers alone, consider finding a way to add some noise to your garden. Animals might think a human or predator is in the garden and leave your plants alone when they hear the noises. Try hanging wind chimes or leaving a radio playing in or near the garden. Much like the motion-activated ultrasound  mentioned above, you try blowing whistles or sounding horns when you see pests enter your property to shoo them away. Just beware that the animals might become accustomed to the sounds.  

9. Place some plants in raised garden beds.

Raised wooden garden beds with young plants separated into growing sections.
Photo: Photo by Cathy Scola via Getty Images

If you have a few plants that you prize most that come under attack, such as herbs for your kitchen or cutting flowers, try growing them in a raised bed. A raised garden bed, or even an elevated wood planter box, can also protect plants from animals, particularly if rabbits or other smaller animals are the destructive culprits. 

If you only have a few plants to grow that attract a pest, try a raised garden bed to keep the plants out of smaller animals’ and burrowers’ reach. Remember you can add a horizontal barrier like hardware cloth beneath raised beds that are completely open on the bottom to stop burrowing pests. 

10. Provide an alternative source of food.

A squirrel rests on the ledge of a bird feeder.
Photo: Y. Clare Foster (Herazeusmom) / 500px via Getty Images

You might be able to dissuade some animals from nibbling at your plants by making other types of food readily available to them. For instance, if you install a bird feeder near your garden, some of the smaller animals might decide to munch on bird seed instead of your plants’ foliage and flowers.

11. Hang soap near plants that attract pests.

A white bar of soap sitting on a wooden table with bubbles.
Photo: Basak Gurbuz Derman via Getty Images

Believe it or not, soap, particularly Irish Spring bar soap, can be a good solution if you’re thinking about how to protect a vegetable garden from animals using scents. Mice, rabbits, deer, chipmunks, and other animals do not like the smell of this soap and will try to maintain their distance from it. Hang drawstring pouches with a bar of soap or shavings  in them around your garden or near pest-attracting plants using wooden stakes.

12. Surround your garden with aromatic herbs and textured plants.

Several herbs planted in a garden small signed staked into the ground, labeling the plant varieties.
Photo: Karl Tapales via Getty Images

Once you know which pest is damaging your plants, you can surround your garden with plants that have scents, tastes, or textures that the animal avoids. In addition to mint, try plants with thick, spiky leaves or strong odors. For example, deer avoid plants with sap or certain odors, such as milkweed and salvia (in the mint family). Rabbits avoid herbs like thyme, chives, and oregano, along with many others. 

Select plants that thrive in your growing zone and local conditions (sun, rainfall, etc.) for best results. If you plant a wall of deterrent greenery between the animals’ path and your vegetable or flower garden, they might just pass you by.

13. Cover fruiting plants temporarily.

A small berry plant is protected by a net from birds and pests.
Photo: Philippe Gerber via Getty Images

Many plants go unnoticed by animals until they begin to fruit. Bird netting is a light and thin mesh with holes no larger than ¾ inch that keeps beaks and teeth from reaching fruit. Wrapping it around a fruit tree as it ends flowering will prevent birds from eating young fruit. The same concept can work for small fruiting shrubs like blueberries, along with vegetables or other plants that are under attack and too large for wire cloches. 

If you see bite marks and large holes in your tomatoes, for example, cover the entire plant with bird netting, securing the cover with clamps or ties attached to posts or stakes. A similar idea is plant row cover, a thin cloth that creates a munching barrier but allows sun, air, and moisture through. If your tomato or zucchini fruits are nearly ready to pick, drape or lay and clamp the cloth in a way that temporarily protects the mature fruits but allows you to open the barrier to harvest.

 
Young couple (heads not seen) use trowels to dig into a small raised garden bed on Astroturf, surrounded by gardening accessories.

Our Best Advice for Beginner Gardeners

We’ll help you set up your first garden—whether that’s a few pots on your patio, a raised bed, or an in-ground plot out back—and select the right plants for your soil and region.

 
Deirdre Mundorf Avatar

Deirdre Mundorf

Contributing Writer

Deirdre Mundorf is a former teacher turned writer, specializing in homes, family, and pets. She has been contributing to BobVila.com since 2020.


Teresa Odle Avatar

Teresa Odle

Contributing Writer & Editor

Teresa Odle is a writer and editor who has lived and gardened throughout the mountains of arid New Mexico. She joined the Bob Vila team as a freelancer in March 2020, editing and writing helpful articles mostly on gardening and outdoor living.


Learn more about BobVila.com Editorial Standards