1 Kings 11:15-16 NIV

15 Earlier when David was fighting with Edom, Joab the commander of the army, who had gone up to bury the dead, had struck down all the men in Edom.1

References for 1 Kings 11:15

16 Joab and all the Israelites stayed there for six months, until they had destroyed all the men in Edom.