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.

know what’s ˈgood for you

know what is necessary for you to do to be successful, etc.; know how to avoid trouble: If you know what’s good for you, young man, you’ll talk to nobody about what you’ve seen here tonight.
See also: good, know
Farlex Partner Idioms Dictionary
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
References in classic literature
"You'll sit right there, if you know what's good for you. Now be good and mind what I say.
"You keep off if you know what's good for you!" he called out suddenly, as though he had made up his mind as to who and what we were.
"Look here, Paul, you'll keep out of this if you know what's good for you."
Try not to to start an argument today, if you know what's good for you. However, it is time to stride confidently forward.
Our response has been an unvarying 'Don't give in if you know what's good for you.'
If you know what's good for you, you will make yourself free for him even if you have a pressing appointment.
stay away from that moon door if you know what's good for you.
If you know what's good for you, you'll leave it there."
I did not bother with the waste of time meetings because of the attitude of 'we know what's good for you'.
Now you know what's good for you, it's also essential you don't let bad habits get in the way.
YOU KNOW WHAT'S GOOD FOR YOU, YOUIL VOTE FOR THE SWEET AND SOVR SPAM CHILL ...
DON'T mess with the dame if you know what's good for you.
I'm not writing here to force a new version Christ on you O reader but if you know what's good for you you will take the first chance at knowing Him that you can get."
London, Dec 27 (ANI): When Oprah Winfrey and Kate Moss espouse "detox" regimes or, when Sharon and Kelly Osbourne say that the Pill can cause cancer, don't take them too seriously if you know what's good for you, say scientists and doctors.
"Things are distorted with the booze haze and you don't know what's good for you. I plan to stay away from it and have replaced it with a new vice - writing.