And we devoted them to destruction, as we did to Sihon the king of Heshbon, devoting to destruction every city, men, women, and children.--Deuteronomy 3:6 (ESV)
When the Israelites entered the Promised Land, they were ordered to wipe out its inhabitants. I believe we can interpret most passages about entering Canaan allegorically--that is, the Israelites represent the Church and Canaan represents Heaven. (There are some limitations to this, but I think we can usually make this connection.)
So how can we apply this somewhat morally troubling verse to the New Covenant? In fact, how can this be right in the first place? Killing children seems more like an act of Nazi Germany than an act of God's chosen people. But God is wiser and more just than we are. He knew that little Ammonite boys grew up to be big Ammonite men and big problems for the people of Israel. Plus, the Canaanites were abominations to the Lord--even the smallest of them.
We need to treat sin the same way the Israelites treated the Canaanites. Sin is always an abomination to the Lord and a danger to our souls (no matter how small it seems). As such, we need to kill it (Romans 8:13). But we shouldn't pick and choose which sins to kill and which to keep. We shouldn't forsake lust and yet allow gossip to remain in our hearts. We shouldn't keep "pet sins" which seem harmless and pleasurable--they are in fact soul-killing iniquities.
In Romans 8:13 Paul writes, "For if you live according to the flesh, you will die, but if by the Spirit you put to death the deeds of the flesh, you will live." We need to apply this verse to all sins, no matter how much we love their pleasures or how small their dangers seem.