It is narrated from Sayyiduna Ibn Abbas (may Allah be pleased with them both) that the Messenger of Allah (peace and blessings be upon him) forbade wearing weapons in the cities of the Muslims or on the two Eids, except when the enemy is present.
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 11392