A chemical (or biological) agent that kills fungi or their spores or prevents their growth for a period of time.