Both the US and the Soviets lost because Afghanistan isn't a country in a traditional sense; it's just an area of land with _lots_ of regions countrolled by war lords that doesn't have allegiance to anything central (i.e. "the country Afghanistan").
It's impossible to win a war against something like that, unless - as you correctly points out - you obliterate everything.
Both the US and the Soviets lost because Afghanistan isn't a country in a traditional sense; it's just an area of land with _lots_ of regions countrolled by war lords that doesn't have allegiance to anything central (i.e. "the country Afghanistan").
It's impossible to win a war against something like that, unless - as you correctly points out - you obliterate everything.