So we need bacterivirous nanobots ...
(We'll probably make self-replicating ones that destroy all life.)
(We'll probably make self-replicating ones that destroy all life.)
Bacteriophages are what you want, you just need to find the right strain.
Roundworms, acari, springtails, and such eat bacteria though; they're apparently known collectively as detritivores.
Plus, phages are viruses, unlike roundworms and the like, they can survive centuries without food.
They also, as mentioned, account for 30% of death in marine life every day, biggest killer organism on this planet.
There is phage-therapy too, an alternative to anti-biotics, where you are given a dosage of phages in an infected area. Due to their nature they only attack specific strains of bacteria and can easily eradicate the entire population within a few hours.