As an Amazon Associate, I earn from qualifying purchases.
To keep groundhogs out of your garden, bury fences, remove food, and exclude them humanely.
I help homeowners solve wildlife problems with calm, proven steps. This guide breaks down how to keep groundhogs out of your garden with clear plans, real results, and simple tools. If you want a safe, legal, and lasting fix, stay with me. You will learn what works, what fails, and how to protect tender plants without stress.

Meet the Groundhog: Behavior, Habits, and Clues
Groundhogs, also called woodchucks, are day-active rodents that love tender greens. They dig wide burrows with large dirt mounds and eat in bursts in the morning and late day. In summer, they can strip a bed in one visit. In fall, they feed more to build fat for winter.
Knowing their habits helps you keep groundhogs out of your garden. Look for fresh burrow holes, wide chew marks, and wide, flat droppings. Watch for clean-cut stems near the ground. Note trails under fences and decks. If you see a groundhog at noon, it may live very close. A humane plan will target where they enter, what they eat, and how they nest.

Source: kellogggarden.com
Prevention First: Remove What Attracts Them
If you remove the draw, you make your yard boring to a groundhog. That is the simplest path to keep groundhogs out of your garden.
Do these first:
- Pick ripe produce fast. Groundhogs love soft fruit, beans, peas, and lettuce.
- Secure compost. Use a sealed bin. Do not toss kitchen scraps on a pile.
- Clean brush and tall weeds. Keep grass short. Clear wood and rock piles they use as cover.
- Store bird seed in sealed bins. Clean up spilled seed under feeders.
- Cap crawlspace gaps. Cover open spaces under sheds, decks, and steps once you confirm no animals are inside.
Plant choice helps too. To keep groundhogs out of your garden, place less-tasty plants along edges:
- Daffodils, alliums, lavender, yarrow, rosemary, thyme, and bee balm are less appealing.
- Use tender crops inside fenced beds. Leave strong herbs and flowers on the outer ring.
From my own yard, I cut back a dense brush strip along the fence and locked down the compost. I also moved my bird feeders. That alone cut visits in half. This is the quiet base that helps you keep groundhogs out of your garden long term.

Source: kallecoplantnursery.com
Physical Barriers That Work
If you want sure results, use barriers. This is the gold standard to keep groundhogs out of your garden.
Garden fencing:
- Use 2 by 3 inch welded wire or hardware cloth with small mesh.
- Height should be at least 3 feet. Bend the top 6 to 12 inches outward.
- Bury the bottom 12 to 18 inches in a trench. Bend it outward in an L shape to stop digging.
- Stake it tight to the ground. Groundhogs slip under gaps.
- Add a simple gate with the same dig-proof trench and L bend.
Electric add-on:
- One low hot wire at 4 to 5 inches and a second at 10 inches can train them off.
- Use a charger rated for small animals. Keep grass off the wires.
Decks and sheds:
- To keep groundhogs out of your garden and out from under structures, dig a trench.
- Attach hardware cloth to the base. Bury and bend it outward in an L.
- Add a one-way door if an animal is inside. Seal only after it leaves for good.
Row covers and cloches:
- Use fabric or mesh over young plants. Pin edges tight.
- This pairs well with a fence during peak feeding.
A small note from field work: most “failures” happen at gates or corners. Double check those spots. When you get the fit right, barriers will keep groundhogs out of your garden day after day.

Source: kellogggarden.com
Repellents: What Helps and What Does Not
Repellents can help as part of a full plan. They rarely work alone. Use them to buy time or protect small zones. That is a smart way to keep groundhogs out of your garden in the short term.
Options that may help:
- Castor oil soil drenches can make digging less fun. Reapply after rain.
- Taste sprays with capsaicin can make leaves less tasty. Reapply every few days.
- Predator scents can push them to try a new spot. Results vary.
Tools that help:
- Motion sprinklers can startle them. Place at entry points. Move them often.
What does not hold up:
- Ultrasonic devices are weak. Field tests show little change.
- Soap bars, hair, coffee grounds, and mothballs do not solve the root cause. Some are unsafe or illegal to use outdoors.
Repellents have limits. Use them while you install a fence or seal a deck skirt. Layering tools is the best path to keep groundhogs out of your garden.

Source: torontowildlifecentre.com
Humane Trapping, Relocation, and One-Way Doors
Trapping may be legal in some places and restricted in others. Many states ban relocation due to disease risk and poor survival. Always check local rules. If you are not sure, call your wildlife agency. You must keep people and pets safe.
If trapping is legal and you choose to try:
- Use a sturdy live trap sized for a groundhog. Bait with apple, cantaloupe, or broccoli.
- Place the trap on a known path. Shade it. Check it often, at least twice a day.
- Set traps only when you can act fast. Never trap in late spring when young may be in the den.
Better yet, use one-way doors:
- Mount a one-way door on the burrow under a shed or deck.
- When the groundhog leaves to feed, it cannot re-enter.
- After a quiet period, seal the gap with the same buried L-shaped mesh.
Hiring a pro:
- A licensed operator knows the law, timing, and humane steps.
- They can also grade, trench, and install barriers the right way.
Handled with care, this step can help you keep groundhogs out of your garden without harm.

Source: gardening4joy.com
Garden Design That Deters Groundhogs
Make your layout hard to raid. Good design makes it far easier to keep groundhogs out of your garden.
Smart layout tips:
- Use raised beds with hardware cloth on the bottom to stop digging up into roots.
- Add a 24 inch gravel strip around beds. Loose rock is not fun to cross or dig.
- Keep paths wide and open. Groundhogs like cover. Open space makes them wary.
- Put tasty crops deeper inside your plot. Use herbs and flowers as a buffer ring.
- Cover new transplants with mesh for the first two weeks.
Plant plan:
- Group tender crops, like beans and lettuce, behind the best fence.
- Plant less-tasty flowers along the border. Daffodils and alliums can help.
- Try a small decoy patch far from the main bed if you have space. It can draw them away.
These design tweaks add up. They reduce raids and help you keep groundhogs out of your garden while you enjoy a clean look.

Source: ourediblegarden.org
Seasonal Strategy and Simple Checklist
A clear plan by season is how you keep groundhogs out of your garden without guesswork. Here is a quick path to follow.
Early spring:
- Walk the yard. Find old holes, new mounds, and weak fence spots.
- Install or repair fences before growth starts.
- Clean brush and secure compost.
Late spring:
- Use row covers on tender starts.
- Add motion sprinklers to hot spots.
- Watch for fresh digging at fence lines.
Summer:
- Harvest fast and often.
- Reapply taste sprays after rain if you use them.
- Check gates and low fence edges every week.
Fall:
- Seal sheds and decks with buried mesh once you confirm no animals are inside.
- Remove spent plants and ground cover piles.
- Mark burrow spots for next year’s fence work.
Routine beats panic. A simple habit loop is enough to keep groundhogs out of your garden year after year.

Source: scottsmiraclegro.com
Mistakes To Avoid and How To Fix Them
Many folks try one thing, see a raid, and give up. Small misses can undo big work. Spot these fast to keep groundhogs out of your garden.
Common mistakes:
- Shallow fence digs. Twelve inches down with an outward L is key.
- Gaps under gates. A one inch gap is a door.
- Late harvests. Overripe fruit is a magnet.
- Only using sprays. Rain and growth break the effect.
- Sealing a den with young inside. This causes odor, stress, and legal risk.
Fast fixes:
- Add soil or boards to close gaps.
- Switch to small-mesh hardware cloth at the base.
- Move bait or traps to fresh sign if you use them.
- Pair repellents with barriers, not instead of them.
- Use a one-way door and wait for a calm, empty den before sealing.
I once raised my fence but did not bury it. The groundhog dug under in two days. After I added the L-shaped trench, the raids stopped. Simple, strong steps help you keep groundhogs out of your garden for good.

Source: youtube.com
Cost, Time, and What to Expect
You can keep groundhogs out of your garden at many budget levels. Set a plan that fits your space.
Typical ranges:
- DIY wire fence with trench for a small bed: low to mid cost. One weekend.
- Full yard barrier with hardware cloth and two gates: higher cost. Two to three weekends.
- Motion sprinklers and taste sprays: low to mid cost. Low labor, but ongoing refills.
- Pro exclusion with one-way doors and skirting: higher cost. One to two days.
Return on effort:
- Most folks see big gains once the fence is buried right.
- Repellents make minor gains. Use them to bridge time.
- Routine harvest and clean edges reduce risk at almost no cost.
Plan your time, and you can keep groundhogs out of your garden without breaking the bank.
Frequently Asked Questions of How To Keep Groundhogs Out Of Your Garden
What smells keep groundhogs away?
Strong scents like castor oil and predator urine can push them to test new paths. They fade fast and wash off in rain, so reapply often and pair with fencing.
How deep should I bury garden fence to stop groundhogs?
Bury it 12 to 18 inches and bend the bottom outward in an L shape. This stops digs at the base and is the most reliable method.
Do ultrasonic devices work on groundhogs?
Independent tests and field use show weak or no effect. Invest in buried fencing, tight gates, and row covers instead.
Is it legal to relocate a groundhog?
Laws vary by state and city, and many ban relocation. Check with your local wildlife agency or hire a licensed professional.
What do groundhogs eat in gardens?
They love beans, peas, lettuce, broccoli, and soft fruit. Protect these with fences, covers, and fast harvests to keep groundhogs out of your garden.
When is the best time to install fencing?
Do it in early spring before heavy feeding starts. Early action helps you keep groundhogs out of your garden all season.
Can I use a one-way door for a burrow under my shed?
Yes, if no young are present. Install the door, confirm the site is empty, then seal with buried hardware cloth.
Conclusion
You can protect your beds with a calm, clear plan. Remove food and cover, build a buried fence, add covers on young plants, and seal structures with care. Use repellents as a helper, not a crutch. If needed, bring in a pro who knows the law and humane steps.
Start this weekend with one action: trench and bury the base of your fence. That one move will help you keep groundhogs out of your garden for seasons to come. If you found this helpful, subscribe for more practical yard guides or leave a comment with your toughest pest challenge.
I enjoy sharing simple gardening ideas, lawn care tips, and honest product reviews that help make outdoor work easier. From home gardening guides to helpful tools and lawn care advice, I write easy-to-follow content to help readers create a healthier and better-looking outdoor space without wasting time or money.