Scrape the soil under the deck to remove any vegetation with a hoe. Some animals find weeds attractive for food and shelter. Cover the ground under the deck with landscape fabric to prevent weeds from growing under the deck.
Cover the landscape fabric completely with large rocks. The rocks prevent animals from finding a cozy place to make their homes.
Dig a 1-foot wide by 1-foot deep trench around the deck with a shovel. Bend the bottom 12 inches of a roll of 1-by-2 inch welded wire fencing to form an “L” shape. Set the bottom, horizontal portion of the “L” in the bottom of the trench with the vertical portion against the deck posts. Attach the fencing to the deck posts with fencing staples.
Back-fill the trench with the soil you dug out earlier. Pack it down firmly in place.