Physical barriers stop most garden pests before they reach your plants

The most reliable way to keep critters out of raised beds is to block them with fencing or netting before they arrive. A hardware cloth barrier — a metal mesh with half-inch or smaller openings — laid flat on the ground under your bed stops burrowing animals like voles, moles, and rabbits from tunneling up from below. Bury it 6 to 12 inches deep around the perimeter, or lay it across the bottom of the bed before you fill it with soil.

For above-ground pests, row covers (lightweight fabric you drape over plants) keep insects off seedlings and young plants. find the edges with soil, rocks, or landscape pins so nothing crawls underneath. Remove the covers once plants flower and need pollinator access, or switch to a mesh with larger openings that lets bees through but blocks beetles and moths.

Taller fencing works for larger animals. A 3-foot fence stops rabbits; deer need 5 to 6 feet or an angled design that confuses their jumping. Electric fencing is effective for raccoons and groundhogs but requires setup and maintenance. If you live in an area with heavy deer or bear pressure, a fence is often the only method that works reliably.

Key Takeaways

  • Hardware cloth buried under your bed stops burrowing animals; row covers block flying and crawling insects from reaching young plants.
  • Fencing height depends on what you're keeping out — 3 feet for rabbits, 5 to 6 feet for deer, electric fencing for raccoons and groundhogs.
  • Removing plant debris and fallen fruit eliminates food sources that attract pests to your garden in the first place.
  • Companion planting with strong-smelling herbs like garlic, marigolds, and nasturtiums deters some insects and small animals but works best combined with barriers.
  • Timing your planting to avoid peak pest seasons and rotating crops year to year reduces the pest population before they become a problem.

Remove food sources that attract critters to your garden

Pests come to raised beds because food is there. Fallen fruit, rotting vegetables, and plant debris are open invitations to raccoons, squirrels, birds, and insects. Clean up dropped produce daily during harvest season, and remove dead leaves and spent plants promptly rather than letting them pile up in the bed.

Compost piles near your garden also draw animals. Keep compost in a sealed bin with a latch, or place it far enough away that the smell doesn't pull critters toward your beds. If you add kitchen scraps to compost, bury them under several inches of brown material (leaves, straw) so the smell is less obvious.

Water in the early morning rather than evening. Evening watering creates wet soil that attracts slugs, snails, and insects looking for moisture. Morning watering also gives you a chance to spot damage before pests hide for the day.

Use companion plants and strong scents to discourage pests

Companion planting — growing certain plants together because they repel pests — works best as a supporting layer, not a standalone solution. Garlic and onions deter aphids and some beetles. Marigolds repel some insects and are believed to deter rabbits, though results vary. Nasturtiums act as a trap crop — pests prefer them to your vegetables, so they eat the nasturtiums instead.

Herbs like mint, rosemary, and sage have strong smells that some animals find unpleasant. Plant them around the perimeter of your bed or in containers nearby. The effect is mild and works best on insects rather than larger animals, but combined with a physical barrier it adds another layer of discouragement.

Sprinkling diatomaceous earth (a powder made from fossilized algae) around plants damages the outer coating of soft-bodied insects like slugs and beetles. Reapply after rain. This method is labor-intensive and works only on insects, not larger pests, so it's most useful for specific problem insects rather than overall protection.

Time your planting to avoid peak pest seasons

Different pests are active at different times of year. Spring is peak season for slugs and snails in most climates; early summer brings beetles and aphids; late summer and fall attract squirrels and raccoons drawn to ripening fruit and seeds. Planting cool-season crops (lettuce, spinach, peas) in spring and fall, when warm-season pest pressure is lower, reduces damage naturally.

Starting seeds indoors and transplanting larger seedlings into the bed rather than direct-seeding means plants are past the most vulnerable stage before peak pest season arrives. A 4-week-old tomato plant is harder for insects to kill than a seedling.

If a particular pest has been severe in past years, delay planting that crop by a few weeks to let the pest population peak and then decline before your plants arrive. This takes observation year to year, but it's a low-effort way to reduce damage without adding barriers.

Rotate crops and clear beds thoroughly each season

Many garden pests overwinter in soil and plant debris. Clearing your bed completely at the end of the season — removing all plants, leaves, and mulch — eliminates hiding places and food sources for pests waiting out the winter. Compost the debris if it's disease-free, or bag it for disposal.

Crop rotation — planting different plant families in the same bed each year — breaks the life cycle of pests that specialize in one crop. Tomato hornworms, for example, lay eggs in tomato soil; if you plant beans or lettuce there the next year, the eggs hatch to no food and the population crashes. A straightforward three-year rotation (tomatoes, then beans, then leafy greens, then back to tomatoes) handles most common pests.

If a bed had a severe pest problem the previous year, consider replacing the top 4 to 6 inches of soil before planting again. This removes eggs and pupae that overwintered in the soil. It's an investment, but it can reset a heavily infested bed.

Combine methods for the best results

No single method stops all pests. A raised bed with hardware cloth underneath, row covers on young plants, companion herbs around the edge, and regular cleanup handles most common garden pests. If you live in an area with heavy deer or groundhog pressure, add fencing. If slugs are your main problem, focus on morning watering and diatomaceous earth.

Start with the barriers that match your biggest pest problem, then add companion plants and cleanup as supporting layers. Over a season or two, you'll learn which pests are most damaging in your garden and which methods work best for your situation.

Frequently Asked Questions

What size mesh do I need for hardware cloth to stop small animals?

Half-inch openings stop voles and moles. Quarter-inch mesh stops smaller burrowing insects but is more expensive and harder to work with. For most home gardens, half-inch is the practical choice — it blocks the animals that cause the most damage without being difficult to install.

Can I use row covers on plants that need pollination?

Yes, but you have to remove them or switch to a larger-mesh cover once flowers appear. Bees can't reach flowers through solid row cover fabric. If you're growing crops that self-pollinate or are wind-pollinated (like beans and peas), you can leave covers on longer. For squash, cucumbers, and melons, remove covers when flowering starts.

Do ultrasonic pest repellers work on garden pests?

No. Studies show ultrasonic devices don't reliably deter garden pests. They may work on some rodents indoors under specific conditions, but outdoors with wind, rain, and competing sounds, they're ineffective. Physical barriers and removal of food sources are far more reliable.

How deep should I bury hardware cloth to stop rabbits?

Rabbits don't dig as deep as moles and voles, so 6 inches is usually enough. If you're also protecting against voles, go 12 inches. Extend the mesh 6 inches up the sides of the bed or bend it outward at ground level so rabbits can't dig around the edge.

What's the best time to install hardware cloth in an existing bed?

Fall or early spring, when you're doing seasonal cleanup anyway. If you're installing it in an existing bed with plants, you'll have to remove the soil, lay the mesh, and refill — a bigger job than installing it when you first build the bed. For new beds, always lay hardware cloth before filling with soil.