It is narrated from Hazrat Abu Saeed Khudri (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: The whole earth is a mosque and a means of purification, except for graveyards and bathhouses.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 11788
Hadith Gradingحکم دارالسلام:حديث صحيح ، وله إسنادان ، أحدهما موصول من طريق حماد بن سلمة ، والآخر مرسل من طريق سفيان الثوري ، وهذا معنى قوله : "ولم يجز سفيان أباه" يعني لم يذكر أبا سعيد يحيي بن عمارة والد عمرو بن يحيي