A bacteriocide or bactericide is a substance that kills bacteria and, preferably, nothing else.

See also: antibiotic