if you know what's good for you

if (one) knows what's good for (one)

If one wants to avoid trouble (one will do or avoid a certain thing). Oh, you'll be on time for the meeting, if you know what's good for you. If he knows what's good for him, he'll stop calling me that.
See also: good, if, know
Farlex Dictionary of Idioms.

if you know what's good for you

Fig. if you know what will be to your benefit; if you know what will keep you out of trouble. Mary: I see that Jane has put a big dent in her car. Sue: You'll keep quiet about that if you know what's good for you. Sally: My teacher told me I had better improve my spelling. Bill: If you know what's good for you, you'd better do it too.
See also: good, if, know
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs.
See also:
  • come to no good
  • do no good
  • (one) (has) never had it so good
  • for good measure
  • be as good as new
  • do (one) a/the world of good
  • as good as it gets
  • as good as new
  • (as) good as new
  • expectation