To hold your tongue

To keep quiet or remain silent about something (often used when to say something would cause trouble)

e.g. I was very cross with my father and I wanted to confront him about how he had treated my sister but I had to hold my tongue until all our guests had left.