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.