I just had two toenails removed, what's the best way to prevent infection?

Keep Clean. The best thing to do is to keep the area clean. Putting some neosporin and a bandaid on should help if a bandage is not already on from the physician. Change the bandage around twice a day. Avoid tight fitting shoes as well. http://www.drugs.com/cg/toenail-fingernail-removal-aftercare-instructions.html.
Keep it clean. Follow the instructions the dr. Gave you.
Nail. Clean with sterile water twice a day. This will scub and remove crust which can be a nidus for bacteria infection. Keep it covered while still oozing.