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. (Using translation from Abū Dāʾūd 946)
أَنَّ النَّبِيَّ ﷺ قَالَ لَا تَمَسَحْ وَأَنْتَ تُصَلِّي فَإِنْ كُنْتَ لَا بُدَّ فَاعِلًا فَوَاحِدَةً تَسْوِيَةَ الْحَصَا