Sunan an-Nasa'i, Hadith 4278 ⓘ
Salim bin 'Abdullah narrated that his father said: "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."
أَخْبَرَنَا وَهْبُ بْنُ بَيَانٍ، قَالَ حَدَّثَنَا ابْنُ وَهْبٍ، قَالَ أَخْبَرَنِي يُونُسُ، قَالَ قَالَ ابْنُ شِهَابٍ حَدَّثَنِي سَالِمُ بْنُ عَبْدِ اللَّهِ، عَنْ أَبِيهِ، قَالَ سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم رَافِعًا صَوْتَهُ يَأْمُرُ بِقَتْلِ الْكِلاَبِ فَكَانَتِ الْكِلاَبُ تُقْتَلُ إِلاَّ كَلْبَ صَيْدٍ أَوْ مَاشِيَةٍ .
also referenced under: Book 42, Hadith 16 (In-Book) & Volume 5, Book 42, Hadith 4283 (DarusSalam)