What is the meaning of [Throw the Baby Out with the Bath Water]

Eliminate something good while discarding the bad parts of something