Language:
كتاب الصلاة
8  
Prayers (Salat)
(34)
Chapter: To scrape the nasal secretion off the mosque with gravel
(34)
باب حَكِّ الْمُخَاطِ بِالْحَصَى مِنَ الْمَسْجِدِ
Sahih al-Bukhari 408, 409

Narrated Abu Huraira and Abu Sa`id:

Allah's Messenger (ﷺ) saw some expectoration on the wall of the mosque; he took gravel and scraped it off and said, "If anyone of you wanted to spit he should neither spit in front of him nor on his right but he could spit either on his left or under his left foot."

حَدَّثَنَا مُوسَى بْنُ إِسْمَاعِيلَ، قَالَ أَخْبَرَنَا إِبْرَاهِيمُ بْنُ سَعْدٍ، أَخْبَرَنَا ابْنُ شِهَابٍ، عَنْ حُمَيْدِ بْنِ عَبْدِ الرَّحْمَنِ، أَنَّ أَبَا هُرَيْرَةَ، وَأَبَا، سَعِيدٍ حَدَّثَاهُ أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم رَأَى نُخَامَةً فِي جِدَارِ الْمَسْجِدِ، فَتَنَاوَلَ حَصَاةً فَحَكَّهَا فَقَالَ ‏ "‏ إِذَا تَنَخَّمَ أَحَدُكُمْ فَلاَ يَتَنَخَّمَنَّ قِبَلَ وَجْهِهِ وَلاَ عَنْ يَمِينِهِ، وَلْيَبْصُقْ عَنْ يَسَارِهِ أَوْ تَحْتَ قَدَمِهِ الْيُسْرَى ‏"‏‏.‏
Reference : Sahih al-Bukhari 408, 409
In-book reference : Book 8, Hadith 60
USC-MSA web (English) reference : Vol. 1, Book 8, Hadith 402
  (deprecated numbering scheme)