A dog that likes to dig can pretty quickly destroy your yard. And though you can scold them when you catch them in the act, stopping the behavior entirely will likely require a bit more effort. With warmer weather on the way and yard improvement on the spring to-do list, here’s how to fix those holes (as well as a few ideas for stopping your dog from digging in the first place).

Why your dog might be digging in your yard

You can fill in the holes your dog has dug, but you’ll be doing that endlessly if you don’t address the underlying reason your dog is digging holes in the first place. Dogs may dig up a yard for a number of reasons:

They’re bored and need entertainment or a job to do.

They were bred to dig.

They are searching for prey, like burrowing animals or pests.

They’re hot (or cold).

They’re trying to escape after or away from something.

They’re seeking attention.

It may be hard to find the root of the problem at first, but considering certain canine patterns and behaviors can help you narrow it down.

Your dog may be prey hunting if they dig primarily in one spot, around tree roots, or in a path pattern, which means you may have to deal with pests in your yard, like moles.

If they lay down in their holes, they may be seeking protection from the heat.

Dogs left alone for an extended time may be more likely to dig for entertainment or attention—remember, how you “parent” you pup can have a profound affect on its behavior.

How to stop your dog from digging in your yard

How you stop the digging depends on the underlying cause, but in general, consider first what your dog might need—whether that’s a toy to keep it entertained, or shade, or water. Frequent walks, minimizing unsupervised time and engaging your dog with tricks or commands can help, too. Punishing your dog generally doesn’t. And if you’re ferreting out pests, be sure to avoid toxic products that your dog could accidentally ingest.

An oft-repeated bit of lore suggests that filling holes with your dog’s own poop will deter them from digging in the same spot again. It’s worth a try—most dogs won’t go after their own poop, but some might. If it’s a deeper hole, don’t put their poop at the bottom. Add some soil first, then place the poop a few inches below the surface, and top off with more soil.

Finally, if the digging continues, you may be able to train your dog to dig in a designated area—say, a pit filled with soil or sand and your dog’s toys. Lead them to that area and reward them when they use their digging pit instead of digging in other parts of your yard.

How to repair holes your dog has dug in your yard

Filling in the holes your dog has dug doesn’t sound complicated, but you shouldn’t just push the dug-out dirt back into the hole. (You probably wouldn’t be able to do this anyway, as dogs that dig typically make a huge mess by kicking dirt everywhere.) Instead, you’ll need to bring in topsoil and, if you have grass, add grass seed or a sod patch.

Follow these steps when repairing dog-dug holes.

If you’re using grass seed

Fill the hole with topsoil, water it, and add just enough additional soil to bring it to the same level as the ground.

Add seed and water, following the instructions on the bag.

If you’re using a sod patch

If you’re using a sod patch, fill the hole with soil to just below ground level, leaving a gap equal to the thickness of your sod patch.

Roll out the sod over the hole, and cut the edges to fit.

Remove the sod and shovel out the hole as needed so the sod patch will sit flush with the surrounding ground.

Place the sod and water it daily until it takes root.