If there are many different mobs, you will need to place several command blocks with the name of the mobs you want to kill.
The @e command affects all entities, including players, so this is not a bug.
try typing ''/kill @e[type=mob name here]'' with the brackets
like for example a zombie pigman
/kill @e[type=zombie_pigman]