Abu Qatada reported,

Abu Salama reported, I heard the Messenger of Allah ﷺ say, "A good dream is from Allah, and a bad dream is from Satan. When one of you sees something he dislikes, let him spit lightly to his left three times upon waking, and let him seek refuge with Allah from its evil. It will not harm him, Allah willing."Abu Salama said, "I used to see dreams that weighed on me heavier than a mountain, but once I heard this hadith, I no longer paid them any mind."In another narration, the following was added, "And let him turn over to his other side."

Azami 11677

Sahih

عن أبي قتادة بن ربعي قال

سمعت رسول الله ﷺ يقول: الرؤيا الصالحة من الله، والحلم من الشيطان، فإذا رأى أحدكم الشيء يكرهه فلينفث عن يساره ثلاث مرات إذا استيقظ، وليتعوذ بالله من شرها، فإنها لن تضره إن شاء الله. قال أبو سلمة: إن كنت لأرى الرؤيا هي أثقل علي من الجبل، فلما سمعت هذا الحديث فما كنت أباليها. زاد في رواية: وليتحول عن جنبه الذي كان عليه.

الأعظمي 11677صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Dreams and their interpretation
Chapter
Medicine
Section
One who sees a dream he dislikes
Numbering
Jami al-Kamil 11677 (2nd edition)
Azami 11677