Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
abudawud:653Muslim b. Ibrāhīm > ʿAlī b. al-Mubārak > Ḥusayn al-Muʿallim > ʿAmr b. Shuʿayb from his father from his grandfather

I saw the Messenger of Allah ﷺ praying both barefooted and wearing sandals.  

أبو داود:٦٥٣حَدَّثَنَا مُسْلِمُ بْنُ إِبْرَاهِيمَ حَدَّثَنَا عَلِيُّ بْنُ الْمُبَارَكِ عَنْ حُسَيْنٍ الْمُعَلِّمِ عَنْ عَمْرِو بْنِ شُعَيْبٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ

رَأَيْتُ رَسُولَ اللَّهِ ﷺ يُصَلِّي حَافِيًا وَمُنْتَعِلاً  


See similar narrations below:

Collected by Ibn Mājah
ibnmajah:1038Bishr b. Hilāl al-Ṣawwāf > Yazīd b. Zurayʿ > Ḥusayn al-Muʿallim > ʿAmr b. Shuʿayb from his father from his grandfather

“I saw the Messenger of Allah ﷺ performing prayer both barefoot, and while wearing sandals.”  

ابن ماجة:١٠٣٨حَدَّثَنَا بِشْرُ بْنُ هِلاَلٍ الصَّوَّافُ حَدَّثَنَا يَزِيدُ بْنُ زُرَيْعٍ عَنْ حُسَيْنٍ الْمُعَلِّمِ عَنْ عَمْرِو بْنِ شُعَيْبٍ عَنْ أَبِيهِ عَنْ جَدِّهِ قَالَ

رَأَيْتُ رَسُولَ اللَّهِ ﷺ يُصَلِّي حَافِيًا وَمُنْتَعِلاً