How to Keep Animals Out of Your Yard: What Works

The most effective way to keep animals out of your yard is to combine physical barriers with habitat changes that remove what’s attracting them in the first place. No single tactic works against every species, so the best approach depends on which animals are causing problems and what they’re after. A fence that stops a rabbit won’t slow down a deer, and a motion sprinkler that startles a raccoon tonight may not faze it next week.

Remove What’s Attracting Them First

Before investing in fencing or gadgets, take away the reason animals are visiting. Wildlife enters your yard looking for food, water, or shelter, and eliminating those draws is the single most impactful step you can take. Everything else works better once you’ve made your yard a less appealing destination.

Start with trash cans. Use metal cans with tight-fitting lids, since raccoons, opossums, and rodents can chew through plastic. Store birdseed and pet food indoors or in secure metal containers, and never leave pet food outside overnight. If you have fruit trees, pick up fallen fruit regularly. Compost bins should be enclosed, not open piles.

Overgrown areas give animals places to hide, nest, and feel safe. Clear brush piles, trim low-hanging branches, and mow tall grass along fence lines. Woodchucks, rabbits, and snakes all favor dense ground cover near a food source. Removing that cover makes your yard feel exposed and risky to prey animals, which is exactly what you want.

Fencing: The Right Height for Each Animal

Fencing is the most reliable physical barrier, but the specs matter. A decorative 3-foot fence might look nice and do absolutely nothing against the animal you’re trying to stop.

For deer, you need a minimum fence height of 6 to 8 feet. Anything shorter and they’ll jump it. If a full perimeter fence that tall isn’t practical, consider protecting individual garden beds with tall netting or angled fence extensions that make the jump harder to judge.

For rabbits, a 2-foot-high chicken wire fence with 1-inch hexagonal mesh works well. Buy 3-foot-wide rolls and bend the bottom 12 inches outward to form a horizontal apron on the ground, then bury it several inches deep. This prevents rabbits from digging under the fence line. Without that buried apron, rabbits will simply tunnel beneath the wire within days.

For raccoons and opossums, you need a fence that’s both tall and difficult to climb, ideally 5 to 6 feet high. These animals dig too, so bury a 24-inch horizontal apron several inches underground on the outside of the fence. Raccoons are strong climbers, so a wobbly or flexible top section (like an outward-angled extension) helps prevent them from pulling themselves over. Some gardeners add a single strand of electric fence wire along the top for persistent climbers.

Motion-Activated Sprinklers

Motion-activated sprinklers detect movement with infrared sensors and blast a short burst of water at whatever triggered them. Most consumer models detect motion from 30 to 40 feet away with a 120-degree viewing angle, and some can cover nearly 4,000 square feet when set to full rotation. The spray typically lasts about 5 seconds per activation, which keeps water usage low.

These devices work well as a first line of defense, especially against deer, cats, and herons that startle easily. The combination of sudden water, noise, and movement is genuinely alarming to most animals on first encounter. The limitation is habituation: bold or hungry animals, particularly raccoons and squirrels, can learn that the sprinkler poses no real threat. Changing the sprinkler’s position every few weeks helps, but don’t rely on it as your only deterrent for persistent visitors.

Chemical and Scent-Based Repellents

Commercial repellents work through two basic mechanisms: they either taste painful or they smell frightening. Knowing which type you’re using helps set realistic expectations.

Pain-based repellents use irritants like capsaicin (the compound that makes hot peppers burn). When an animal bites a treated plant and feels the burn in its mouth, nose, and eyes, it learns to avoid that plant. The problem is that most commercial products contain very low concentrations. A USDA Forest Service review of deer repellents found capsaicin levels ranging from just 0.0006% to 3% across different products, and noted that most are likely too dilute to reliably cause avoidance. If you go this route, look for higher-concentration formulas.

Fear-based repellents use sulfurous odors that herbivores associate with predator activity. Coyote urine, putrescent egg solids, meat proteins, and garlic are common active ingredients. Deer and rabbits interpret these smells as signs that a predator is nearby. Products containing putrescent egg solids are among the most widely tested and tend to perform reasonably well.

All repellents share the same practical drawback: they wash off in rain and break down in sunlight, so you need to reapply them regularly, often every few weeks or after any significant rainfall. They’re best used as a supplement to physical barriers, not a replacement.

Ultrasonic Devices Don’t Work

Ultrasonic pest repellers claim to emit high-frequency sound that drives animals away. They’re widely sold and heavily marketed, but the scientific evidence behind them is, as researchers at McGill University put it, “ultra-shaky.”

Lab studies have shown that high-quality ultrasound generators can disrupt the feeding or mating behavior of certain species. But those are research-grade instruments, several grades above anything available to consumers. The commercially available plug-in or solar-powered devices cannot replicate the complex sound patterns needed to produce those effects. Independent testing has repeatedly found them ineffective in real-world conditions. Save your money for fencing or sprinklers.

Keeping Squirrels and Raccoons Off Feeders

If your yard problem centers on bird feeders, the solution is specific. Squirrels can jump over 9 feet horizontally, which means any pole-mounted feeder needs to be at least 11 feet away from trees, fences, rooftops, or anything else a squirrel could launch from. Hanging feeders should be at least 5 feet off the ground and 8 feet from the nearest jumping point.

Cone-shaped or cylindrical baffles mounted on the pole below the feeder physically block climbing animals from reaching the top. Steel baffles with a tapered design work well against squirrels. Raccoons require a different approach: their larger body and stronger grip means standard plastic baffles don’t stop them. Look for longer cylindrical baffles specifically designed for raccoons, which give them no surface to grip as they try to shimmy up the pole.

Choosing Plants Animals Avoid

Landscaping with plants that wildlife finds unappetizing reduces browsing pressure without any hardware. Deer tend to avoid strongly aromatic plants like lavender, rosemary, sage, and ornamental alliums. Plants with fuzzy or prickly leaves, such as lamb’s ear or barberry, also get less attention. No plant is truly “deer-proof” when an animal is hungry enough, but resistant varieties dramatically cut the damage in most seasons.

For your vegetable garden or prized ornamentals, physical fencing is still the most reliable protection. Think of plant selection as a way to reduce casual browsing across the rest of your yard, and fencing as the hard perimeter around what you really can’t afford to lose.

Layering Your Defenses

The yards that stay animal-free long term use multiple strategies together. A fence keeps out the majority of visitors. A motion sprinkler catches the opportunists that find a gap. Scent repellents protect specific high-value plants. And clean habits (secured trash, no pet food left out, cleared brush) ensure you’re not fighting against your own yard’s invitation.

Start by identifying which animals are actually causing your problem. Look for tracks, droppings, and the type of damage (clean-cut stems suggest deer, ragged edges suggest rabbits, dug-up turf points to skunks or raccoons). Once you know the species, you can choose the right fence height, the right repellent, and the right placement for deterrent devices instead of spending money on solutions designed for the wrong animal.