Making flies go extinct completely would not be doable.
Although we can kill the flies that are flying around and bothering us there's no way to kill off all the flies in the world because there are billions of flies on earth.
Also flies multiply really faster and faster than you can kill all of them off.
The best thing that you can do is just kill off all the flies that are around you or kill off most of the flies that are around you.
However no matter how many flies you kill there will be more flies the next summer to bother you.
Flies are annoying but they are actually beneficial to the earth.
The purpose of flies is to pollinate plants, consume decomposing bodies, eat the sludge in your drainpipes, damage crops, spread disease, kill spiders, hunt dragonflies.
There are around 17 million flies per each person so it would be impossible to kill off the entire population of flies as there's more flies around than there are humans.