Sunan Abu Dawud 946
Prayer (Kitab Al-Salat)
حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ، حَدَّثَنَا هِشَامٌ، عَنْ يَحْيَى، عَنْ أَبِي سَلَمَةَ، عَنْ مُعَيْقِيبٍ، أَنَّ النَّبِيَّ صلى الله عليه وسلم قَالَ " لاَ تَمْسَحْ وَأَنْتَ تُصَلِّي فَإِنْ كُنْتَ لاَ بُدَّ فَاعِلاً فَوَاحِدَةً تَسْوِيَةَ الْحَصَى " .
Mu’aiqib reported the Prophet (ﷺ) as saying ; Do not remove pebbles while you are praying; if you do it out of sheer necessity, do it only once to smooth the pebbles
Grading: Al-Albani: Sahih · Muhammad Muhyi Al-Din Abdul Hamid: Sahih · Shuaib Al Arnaut: Sahih · Zubair Ali Zai: Sahih Bukhari (1207) Sahih Muslim (546)
Text from the public-domain hadith-api dataset. Numbering follows that dataset and can differ by a few from some printed editions — check the wording, not only the number.