Take down a peg or two
Means to humble or deflate someone’s excessive ego. There are several variants such as take down a notch, come down a peg or take someone a peg lower. The expression has been used in this figurative sense since the late 16th century but its literal origin and meaning remain obscure. There are, however, several theories. Some have suggested that it has a naval origin in that flags or colours were raised or lowered by a series of pegs or notches, but the OED for one does not support this view. Another theory is that it derives from the communal drinking of alcohol where pegs were positioned in tankards to denote limits to which drinkers had to adhere. If someone drank past their allotted peg, the next person to drink had been taken down a peg or two and thus humiliated. A third theory is that it may refer to some tavern game, such as cribbage, where pegs were used to penalise opponents and thus take them down a peg or two. There is also a musical theory in that string instruments were tuned by means of pegs to lower or raise the tone, but quite why this evolved into having a humbling or chastening effect seems implausible. The debate continues but the origin remains unproven.