Things You'll Need
Sturdy wire fencing
Groundhogs, also known as woodchucks, are pests that quickly destroy a garden and cause damage to a lawn with their extensive burrows. Deterring them from entering your property in the first place is one of the best ways to deal with them; once they move in and begin to build their burrows, they can be tenacious creatures that are difficult to deal with. While there is never any guarantee that all methods will work, there are some steps that can be taken to help groundhog-proof the yard.
Soak a handful of rags in ammonia and place inside an aluminium coffee can with several holes punched in the sides. Set these cans at the entrances to potential burrows. The smell will discourage possible nesting. Refresh the rags when they stop giving off a scent. In the spring, female groundhogs are on the hunt for a place to give birth to their young and raise them until they are old enough to go out on their own. If groundhogs have been seen in the area, assess what parts of the property would make a suitable burrow. This includes areas beneath sheds and porches as well as beneath wood piles.
Do some housecleaning. Get rid of anything that might attract groundhogs to the property, including potential habitats. Get rid of wood piles that have fallen over, trees that have fallen or stumps that remain from cutting down trees. When not feasting on the vegetable garden, groundhogs prefer to forage among tall grass that afford them some kind of cover; getting rid of these will make the yard less attractive.
Install motion-activated devices. Motion lights can have some success at startling groundhogs and scaring them away, but groundhogs that live in an urban or town environment may be well desensitized to the sudden appearance of lights. Motion sensors hooked up to water sprinklers can also have the desired effect, as being continuously sprayed with water can encourage the groundhogs to look elsewhere.
Install fencing around the areas that will most attract the groundhogs to an easy meal. While enclosing the entire yard might not be an option, put the fence around vegetable and herb gardens. Sturdy iron fencing can be purchased at many home and garden stores, and should be buried at least a foot into the ground to ensure the groundhogs don't just burrow under it. A fence several feet high will also discourage them from climbing; the fence has the added benefit of keeping out other area wildlife.
Let the dog make his presence known. An underground fence system can allow the dog the run of the yard while still keeping him contained, and the appearance of such a threatening animal will also help encourage a groundhog family to look for a safer home for their young.
Depending on the area and how much the groundhogs have been exposed to, it may take one of these steps to repel them, or it may take all of them. Keep a close eye out to see if there are any groundhog sighting -- if there are, redouble your efforts.