Saad bin Abu Waqqas reported,

He heard him ask Usama bin Zayd, "What did you hear from the Messenger of Allah ﷺ about the plague?"Usama replied, "The Messenger of Allah ﷺ said, 'The plague is a punishment that was sent upon a group from the Children of Israil, or upon those who came before you. So when you hear of it in a land, do not travel toward it, and when it strikes a land while you are in it, do not leave fleeing from it.'"Abu Nadr said, "Do not let anything drive you out except fleeing from it."

Bukhari 3473

Sahih

حدثنا عبد العزيز بن عبد الله قال حدثني مالك عن محمد بن المنكدر وعن أبي النضر مولى عمر بن عبيد الله

عن عامر بن سعد بن أبي وقاص عن أبيه

أنه سمعه يسأل أسامة بن زيد ماذا سمعت من رسول الله ﷺ في الطاعون فقال أسامة قال رسول الله ﷺ الطاعون رجس أرسل على طائفة من بني إسرائيل أو على من كان قبلكم فإذا سمعتم به بأرض فلا تقدموا عليه وإذا وقع بأرض وأنتم بها فلا تخرجوا فرارا منه قال أبو النضر لا يخرجكم إلا فرارا منه

البخاري 3473صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Hadiths of the prophets
Chapter
Hadith of the cave
Numbering
Darussalam 3473
Bukhari 3473