Healthy soil contains far more beneficial critters than harmful ones, and compost-enriched soil has been shown to fight damping off (a fungal disease that shrivels young plants) and other problems. However, if you are of the bleach-is-next-to-godliness school of gardening — or have identified pests, such as fungus gnats, in your soil — sterilizing your soil may be the way to go. You can sterilize your own soil in a variety of ways.
In a conventional oven: Set the temperature somewhere in the range of 210 to 250 degrees Fahrenheit. Put the moistened soil in an oven-safe container, and cover it with aluminum foil. Use a cooking thermometer to make sure that the center of the soil pile hits at least 180 degrees F, and then cook for 30 minutes. You want to be sure that the soil is heated to at least 180 degrees F, but does not exceed 200 degrees F, for 30 minutes.
Adjust the oven temperature as necessary to keep the soil in the 180- to 200-degree F range. Keeping an oven-safe thermometer probe in the soil can help.
In a microwave oven: Put about a pint of moistened soil in a microwave — safe plastic bag (left open) and microwave it on high for about two-and-a-half minutes. If you’re uncertain about the exact soil volume or power of your microwave, you can always let the soil cool for about 10 minutes and then blast it again. Just remember that you cannot put metal in the microwave — no aluminum foil, rusty nails, or the like in the soil.