Sunan Abi Dawud 5021
Grading supplied with this record: Sahih (Al-Albani)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
الرُّؤْيَا مِنَ اللَّهِ وَالْحُلْمُ مِنَ الشَّيْطَانِ فَإِذَا رَأَى أَحَدُكُمْ شَيْئًا يَكْرَهُهُ فَلْيَنْفُثْ عَنْ يَسَارِهِ ثَلاَثَ مَرَّاتٍ ثُمَّ لْيَتَعَوَّذْ مِنْ شَرِّهَا فَإِنَّهَا لاَ تَضُرُّهُ "
Abu Qatadah said:
I heard the Messenger of Allah (ﷺ) say: A good vision comes from Allah and a dream (hulm) from the devil, so when one of you sees what he dislikes, he must spit on his left (three times), and seek refuge in Allah from its evil. It will then not harm him.
Full reference and source
Sunan Abi Dawud 5021 In-book : Book 43, Hadith 249 English translation : Book 42, Hadith 5003
View source on Sunnah.com (opens in a new tab)