Abu Dharr reported,

The Prophet ﷺ said, "The deeds of my nation were shown to me, both the good and the bad. Among the good deeds I found was removing harm from the road, and among the bad deeds I found was phlegm in the mosque left unburied."

Muslim 1233

Sahih

حدثنا عبد الله بن محمد بن أسماء الضبعي وشيبان بن فروخ قالا حدثنا مهدي بن ميمون حدثنا واصل مولى أبي عيينة عن يحيى بن عقيل عن يحيى بن يعمر عن أبي الأسود الديلي

عن أبي ذر

عن النبي ﷺ قال عرضت علي أعمال أمتي حسنها وسيئها فوجدت في محاسن أعمالها الأذى يماط عن الطريق ووجدت في مساوي أعمالها النخاعة تكون في المسجد لا تدفن

مسلم 1233صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Mosques and places of prayer
Chapter
Prohibition of spitting in the masjid during prayer and otherwise
Numbering
Darussalam 1233
Muslim 1233