These are the hadiths to think about, as we strive to answer the question above:

Abd Allah B. Mughaffal reported the apostle of Allah as saying: Were dogs not a species of creature I should command that they all be killed; but kill every pure black one. (Sunan Abu Dawud, book 10, #2839)

Ibn Mughaffal reported: Allah's messenger ordered the killing of dogs and then said, "what is the trouble with them (the people of Medina? How dogs are nuisances to them (the citizens of Medina)? He then permitted keeping of dogs for hunting and (the protection of) herds. ...[and for] for the protection of cultivated land. (Sahih Muslim, 3814)

Abu Zubair heard Jabir Abdullah saying: Allah's messenger ordered us to kill dogs and we carried out this order so much so that we also killed the dog roaming with a women from the desert. Then Allah's apostle forbade their killing. He said: "It is your duty to kill the jet-black (dog) having two spots (on the eyes) for it is a devil. (Sahih Muslim 3813).

...He [Gabriel] said: Yes, but we [angels] do not enter a house in which there is a dog or a picture. Then on that very morning he [Muhammad] commanded the killing of the dogs until he announced that the dog kept for the orchards should also be killed, but he spared the dog meant for the protection of extensive fields (or big gardens). (Sahih Muslim, 24:5248)