Erythromycin is an antibiotic used to treat a wide variety of bacterial infections. This antibiotic only treats bacterial infections. It will not work for viral infections (e.g., common cold, flu). Unnecessary use or overuse of any antibiotic can lead to its decreased effectiveness.