If a cow or horse steps into a groundhog hole, it can break a leg. For this reason, people who keep horses and cattle have a strong interest in keeping groundhog populations down. Eradication is not possible because new groundhogs will move into existing burrows but when dealing with a large area, it’s reasonably easy to keep the ground hog population down.
You can trap groundhogs in live traps baited with cut up apples or melon. But an easier method is to gas their burrows while the animals are home. Create enough noise and commotion to send them home then gas each burrow, fill it in, mark it with a stake and revisit the site in a few days to make sure the burrows haven't been dug out and reoccupied.
Groundhogs love the greens in your vegetable garden and if they get in they can set your garden back weeks by eating all the fresh shoots. Usually you won't know they are around until after the damage is done. You can then live trap them or gas them in their burrows or set up a motion activated water sprayer system but an easier and more permanent solution is to put a Mr. McGregor's Fence® around your garden.
People don’t usually want to put fences around flower gardens so a Mr. McGregor’s Fence® may not be an option. However, there are other ways to discourage groundhogs in addition to the traditional trapping and gassing methods. Motion activated water sprayers that work by emitting a short, sharp burst of water directed at the offending animal are extremely effective in driving them off. Repellents either sprayed on or sprinkled around plants can do a good job of keeping groundhogs out. Ro-pel®, sprayed onto plants, imparts an extremely bitter taste to foliage and flowers making them unpalatable. Because plants grow fast - and the new shoots will taste just fine - it's necessary to respray at regular intervals. Predator urine can be sprinkled around plantings and works by making groundhogs think there are predators around. This, too, needs to be reapplied at regular intervals. Sometimes a combination of these repellents will work better than one alone.