To remove any extra or unwanted troops in clash of clans, select an army camp, tap on info and then tap on the minus (-) sign on the top right of the unit type that are placed in the camp. The same thing can be done for the troops housed in the clan castle. After pressing the minus or the remove sign, you will have to confirm your removal.
Only a single unit is removed at a time and you will have to repeat the process to remove additional units or unit types. You won’t get a refund of the elixir or the dark elixir that was used to train the troop. Only removing the queued troops in the barracks and dark barracks will refund the elixir or the dark elixir that was spent. Removing the already trained troops only frees up housing space in the army barracks and clan castles.
The reason behind removing the extra troops is to free up space in the army camp. The camps can hold limited number of troops. This number depends upon the army camp level that it was upgraded to. One benefit of the camp over other buildings is that it can be used to house the troops even though the upgrade for it is going on.
Anyways, when the camp holds troops that are not that important, then instead of going into useless raids and just deploying to kill off the units—you can simply remove them. This is a much simpler process, and it saves your trophy and even your shield if you are looking to keep it for the duration of a clan war. Sometimes, we train unnecessary troops by accident and those need to be removed to make space for troops that are actually useful.
Even in the clan castle, you might have units that are not powerful enough to defend or attack. Remember that you can have a different set of troops in the clan castle of your home base and war base. Those are two separate things.
Sometimes, you get useless, low level troops from your clan mates. Those cannot protect your base properly and needs to be removed. To remove them, just hit the info button on the clan castle and hit the minus sign and confirm the removal. You will be able to remove the troops one by one.