Abdullah bin Amir bin Rabia reported,

Umar bin Khattab رضي الله عنه set out for Sham. When he reached Sargh, he was informed that a plague had broken out in Sham. Abdul-Rahman bin Awf then told him that the Messenger of Allah ﷺ had said, "If you hear of it in a land, do not enter it, and if it breaks out in a land while you are there, do not leave fleeing from it." So Umar turned back from Sargh.Ibn Shihab reported from Salim bin Abdullah that Umar turned back solely on account of the report from Abdul-Rahman.

Bukhari 6973

Sahih

حدثنا عبد الله بن مسلمة عن مالك عن ابن شهاب

عن عبد الله بن عامر بن ربيعة

أن عمر بن الخطاب رضي الله عنه خرج إلى الشأم فلما جاء بسرغ بلغه أن الوباء وقع بالشأم فأخبره عبد الرحمن بن عوف أن رسول الله ﷺ قال إذا سمعتم به بأرض فلا تقدموا عليه وإذا وقع بأرض وأنتم بها فلا تخرجوا فرارا منه فرجع عمر من سرغ وعن ابن شهاب عن سالم بن عبد الله أن عمر إنما انصرف من حديث عبد الرحمن

البخاري 6973صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Bukhari
Book
Trickery
Chapter
What is disliked of scheming to flee from the plague
Numbering
Darussalam 6973
Bukhari 6973