From Longman Dictionary of Contemporary Englishit was all I could do to do somethingit was all I could do to do somethingused to say that you only just succeeded in doing something It was all I could do to stop them hitting each other. → all
Examples from the Corpus
it was all I could do to do something• I followed one up the motorway just yesterday and it was all I could do to not retch.• When pro golfer Tiger Woods won the Masters two weeks ago, it was all I could do to suppress a yawn.