Rory Patterson hit a first-half treble as Derry hammered the students in the Premier Division game at Belfield.
The City striker capitalised on blunders to score his opening two goals and he completed his hat-trick with a free-kick after 35 minutes.
Thomas Crawley added a fourth before UCD's David O'Connor was dismissed on 66 minutes for a second yellow card.
Michael Raftner's superb strike made it 5-0 and Mark Griffin scored late on for the rampant Candystripes.
It was the perfect response from Derry after losing in both the league and Setanta Cup in the past week.
Patterson dispossessed keeper Ger Barron to slot in an eighth minute opener and James Kavanagh's poor back-pass let in the striker to fire home his second after 26 minutes.
The former Coleraine and Linfield forward sent a low free-kick into the bottom corner to secure his treble.
The visitors dominated although UCD midfielder Sean Russell curled a free-kick just over before the break.
Crawley's close-range finish came three minutes after the restart and the points were already safe before O'Connor's red card.
Raftner rifled into hit the net from 25 yards on 70 minutes and Griffin completed the rout five minutes from time with a back-post strike from Barry McNamee's cross.