It wasnarrated from 'Abdullah bin Mughaffal that the Messenger ofAllah(ﷺ) commanded that dogs be killed, then he said:
"What do theyuse dogs for?" Then he permitted them to keep farming dogs and dogsof'Ein. Bundar said: "The 'Ein refers to the walls ofAl-Madinah." (ES)
English reference (ES): Vol. 4, Book 28, Hadith 3201 (ES)
Arabic reference (ES): Book 28, Hadith 3322 (ES)