It won’t be defeated since Al shabab commands the loyalty and obedience of multiple clans in the south, “defeating them” would have to entail fighting entire clans and that would cause more carnage.That is why AS must be defeated and 4.5 dismantled with proper constitutional changes and reconciliation between regions. All huge challenges that won't happen over night but within 20-30 years I believe that is realistic.
Remember that 13 years ago the government didn't even control Mogadishu and piracy was at an all time high. There is an observable trend of improvements happening in Somalia even if it’s slow.