Back in the day he commanded stuff like that all the time.
When the LORD your God brings you into the land where you are entering to possess it, and clears away many nations before you, the Hittites and the Girgashites and the Amorites and the Canannites and the Perizzites and the Hivites and the Jebusites, seven nations greater and stronger then you. And when the LORD your God delivers them before you and you defeat them, then you shall utterly destroy them. You shall make not covenant with them and show no favor to them' (Deuteronomy 7:1-2).
"'When you approach a city to fight against it, you shall offer it terms of peace. If it agrees to make peace with you and opens to you, then all the people who are found in it shall become your forced labor and shall serve you. However, if it does not make peace with you, but makes war against you, then you shall besiege it. When the LORD your God gives it into your hand, you shall strike all the men in it with the edge of the sword. Only the women and the children and the animals and all that is in the city, all its spoil, you shall take as booty for yourself, and you shall use the spoil of your enemies which the LORD your God has given you. Only in the cities of these peoples that the LORD your God is giving you as an inheritance, you shall not leave alive anything that breathes" (Deuteronomy 20:10-17).
"'Now therefore, kill every male among the little ones, and kill every woman who has known man intimately. But all the girls who have not know man intimately, spare for yourselves' (Numbers 31:17-18)."
That's your god right?