i just been into water and i have killed about 3 or 3 black fly and about 2 escaped me and i lost em

how is the best way to get rid of the lil fuckers? 1 of my plants is in its 4th week flower others are in 4ish weeks of veg, is there anything anyone can suggest for veg & flower, i only saw the black fly on my big flowering plant, but i take it they wont stay there for long and move on to the rest of my grow :-( oh did i mention what harm can they do?