You can disband the troops you wish to get rid of by following these steps:
-Click on the barracks of the unit you want to disband.
-Select the "Train" icon.
-In the train troops screen, click on the "disband troops " icon located next to the "Training Cost" on the right side of the screen.
Note: Before starting the unit disbanding process, make sure that the troops you wish to disband are present in the city.