Preheat the oven to 200 degrees Fahrenheit.
Fill a metal pan with a 4-inch layer of raw soil. Remove any racks or large pieces of organic matter, such as wood chips. Water the soil until it's slightly moist throughout.
Cover the soil with aluminum foil. Poke a hole in the center of the foil and slide a meat thermometer into the soil so you can accurately gauge the temperature during baking.
Bake the soil until its internal temperature reaches a minimum of 180 F. Continue to bake for an additional 30 minutes, maintaining the soil temperature between 180 and 200 F so any harmful organisms are destroyed.
Remove the pan from the oven and allow it to cool completely. Remove the cover and use the soil after it has cooled to room temperature.