Sunan an-Nasa'i #4278 · The Book of Hunting and Slaughtering

Sunan an-Nasa'iSalim bin 'Abdullah narrated that his father said
Sunan an-Nasa'i · Book 42 · The Book of Hunting and Slaughtering
Sunan an-Nasa'i · كتاب 42 · كتاب الصيد والذبائح
"I heard the Messenger of Allah raise his voice with the command to kill dogs. All dogs were to be killed except dogs used for hunting or herding livestock
أَخْبَرَنَا وَهْبُ بْنُ بَيَانٍ، قَالَ حَدَّثَنَا ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي يُونُسُ، قَالَ قَالَ ابْنُ شِهَابٍ حَدَّثَنِي سَالِمُ بْنُ عَبْدِ اللَّهِ، عَنْ أَبِيهِ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم رَافِعًا صَوْتَهُ يَأْمُرُ بِقَتْلِ الْكِلاَبِ فَكَانَتِ الْكِلاَبُ تُقْتَلُ إِلاَّ كَلْبَ صَيْدٍ أَوْ مَاشِيَةٍ ‏.‏
Reference : Sunan an-Nasa'i 4278In-book reference : Book 42, Hadith 16