Sunan Abi Dawud, Book 2, Hadith 85 (Abu Dawud 475)

Anas reported:

The Messenger of Allah (ﷺ) said: Spitting in the mosque is a sin and it is expiated by burying the spittle.