I just saw a post from someone who was having a bad time with gnats because they used whatever was available at the time. I made about ten gallons of indoor mix by taking all of the outdoor pots with a variety of good soils but the plants had died, and sterilizing it in the microwave. Here's how:
Take two trowelsful of the soil at a time and put in a large microwavable bowl. Nuke for two minutes; no more, no less. It will come out steaming and smelling like beets for some reason. Two minutes is enough to kill all of the plant material that might germinate, but will not kill off the microbes you need in your soil. It's a fast, mistake-free way to do this. Baking in an oven takes a lot longer and can even turn the soil bad if you get it too hot. Store it in a dark place, and you're ready to go when you need a good indoor mix.