Sunan an-Nasa'i, Book 42, Hadith 15 (Nasa'i 4287)

It was narrated from Ibn 'Umar that:

the Messenger of Allah commanded that dogs be killed, except those which were exempted.