The Messenger of Allah ﷺ said, "For one of you to have his belly filled with pus that eats away at him is better for him than to have it filled with poetry."
حدثنا عيسى بن عثمان بن عيسى الرملي حدثنا عمي يحيى بن عيسى عن الأعمش عن أبي صالح
قال رسول الله ﷺ لأن يمتلئ جوف أحدكم قيحا يريه خير له من أن يمتلئ شعرا
Sourcing, agreed upon by Bukhari and Muslim. Bukhari related it in the Book of Poetry, in the chapter on reciting poetry, explaining the most poetic line of speech, and censuring poetry, hadith 6155, and Muslim, hadith 2257, both from the hadith of Amash, with the same wording.