teach someone a lesson - definition and synonyms

phrase informal
  1. to punish someone for doing something bad so that they do not do it again

    She thought he was rude and needed to be taught a lesson.

See also main entry: teach