Sunan Ibn Majah, Book 28, Hadith 1 (Ibn Majah 3202)

It was narrated from ‘Abdullah bin Mughaffal that the Messenger of Allah (ﷺ) commanded that dogs be killed, then he said:

“What do they use dogs for?” Then he permitted them to keep hunting dogs.