Sam Wilson found the mob at his home in Burnside, near Glasgow after his police constable wife had heard voices outside.
Glasgow Sheriff Court was told how the "bored" youths had ploughed through 15 fences and hedges in the neighbourhood before trying to break into the Wilsons' garden hut.
It was alleged Mr Wilson – a former detective sergeant with 30 years' experience – assaulted two of the boys with pots and held another against a fence.
But, the 64-year-old was acquitted after a sheriff said he and his wife had been the victims of "appalling" behaviour by the gang.
The attacks were said to have occurred after Mr Wilson's wife Linda heard their garden shed padlock being rattled at their home in Cleveden Drive, Burnside, on 13 September last year.
Mr Wilson told the trial he saw six or seven youths in his garden "all over the place" causing mayhem, with one clutching a 12in wooden baton.
Sheriff Robert Anthony, QC, found him not guilty, telling him: "I have heard evidence of appalling conduct by youths.
They demonstrated complete disregard for the property of others.
"They did this because they were bored.
I have no doubt of finding you not guilty."