It has been proven in the Saheeh Ahaadeeth, as already stated, that the Dajjaal will not be able to enter Makkah and Madeenah, and that there will be angels at the gates of Makkah to ward him off and prevent him from entering.
It was reported from Abu Hurairah that the Prophet (صلى الله علیه وسلم) said,
"Neither the Dajjaal nor plague will be able to enter Madeenah."
As mentioned above, the Dajjaal will camp outside Madeenah, and it will be shaken by three tremors. Every hypocrite and sinner will go out to join the Dajjaal, and every believer and Muslim will stay. That day will be called the Day of Purification (Yawm al-Khalaas). Most of those who go out to join the Dajjaal will be women. As the Prophet (صلى الله علیه وسلم) said,
"Verily it (Madeenah) is good; its evil will be eliminated and its goodness will be obvious."
Allaah (سبحانه و تعالى) said:
"Women impure are for men impure, and men impure for women impure, and women of purity are for men of purity, and men of purity are for women of purity..." [an-Noor (24):26)
Madeenah will remain inhabited during the days of the Dajjaal, and during the time of Jesus son of Mary (alayhi-salam), until he dies and is buried there. Then it will be destroyed.
'Umar ibn al-Khattab said,
"I heard the Prophet (صلى الله علیه وسلم) say, 'A rider will go around Madeenah and say, There used to be many Muslims here.' " [Ahmad] 
 Ahmad, Musnad, 1/20.
Checker's Note: Da`eef isnaad due to Ibn Lahi'ah and `an`anah of Abu Zubair. The fact that Madinah will be deserted is reported from Abu Hurairah by al-Bukhaaree.