Abu Saeed Khudri reported,

While we were traveling with the Messenger of Allah ﷺ at al-Arj, a poet appeared reciting his verses. The Messenger of Allah ﷺ said, "Seize the devil," or "Hold back the devil. For a man's belly to be filled with pus is better for him than to be filled with poetry."

Azami 14594

Sahih

عن أبي سعيد الخدري، قال

بينا نحن نسير مع رسول الله ﷺ بالعرج إذ عرض شاعر ينشد، فقال رسول الله ﷺ: خذوا الشيطان، أو أمسكوا الشيطان لأن يمتلئ جوف رجل قيحا خير له من أن يمتلئ شعرا.

الأعظمي 14594صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Superior moral conduct
Chapter
Etiquette of speech, words, and correspondence
Section
Discouragement from poetry that diverts from the remembrance of Allah
Numbering
Jami al-Kamil 14594 (2nd edition)
Azami 14594