Sunan an-Nasa'i, Hadith 4279 ⓘ
It was narrated from Ibn 'Umar that: The Messenger of Allah commanded that all dogs be killed except dogs used for hunting or herding livestock.
أَخْبَرَنَا قُتَيْبَةُ، قَالَ حَدَّثَنَا حَمَّادٌ، عَنْ عَمْرٍو، عَنِ ابْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم أَمَرَ بِقَتْلِ الْكِلاَبِ إِلاَّ كَلْبَ صَيْدٍ أَوْ كَلْبَ مَاشِيَةٍ .
also referenced under: Book 42, Hadith 17 (In-Book) & Volume 5, Book 42, Hadith 4284 (DarusSalam)