Ugandan troops are part of the African Union peacekeeping mission in Somalia, whose aim is to support the central government and stop al Shabaab's efforts to topple it.
The Ugandan People's Defence Force (UPDF) said in a statement that its soldiers on Friday had raided al Shabaab hideouts in the villages of Sigaale, Adimole and Kayitoy, just over 100 km (62 miles) southwest of the capital Mogadishu.
"(The raid)... saw the forces put out of action 189 al Qaeda-linked fighters and destroyed a number of military hardware and items used by the terrorist attacks," UPDF said.
There was no immediate comment from al Shabaab on the attack.
The group - which aims to topple Somalia's government and impose its own harsh interpretation of Islamic law - controlled most of south-central Somalia until 2011, when it was driven out of Mogadishu by African Union troops.
Despite the loss of territory, al Shabaab still carries out major gun and bomb attacks, often claiming casualty numbers that conflict with those given by government officials.