Michael Duffy ended City’s goal drought of 180 minutes when he got on the end of a Jon Paul McGovern cross to head home a minute before the break.
UCD went ahead in the 35th minute through Robbie Benson.
Earlier, Patrick McEleney spurned the chance to put the home side in front when he missed from the penalty spot in the 11th minute after he was tripped in the box by Kavanagh.
Derry City: Doherty, Byrne, Collins, Elebert, Jarvis, Duffy, P McEleney, McGovern, Ventre, E Curran, R Curran.
Substitutes: Gallagher, Barry, Foy, McBride, T McNamee, Stewarrt.
UCD: O’Donnell, Boyle, Creevy, Douglas, Langry, Benson, Crowe, Kavanagh, Mulhall, Belhourt, Morrison.
Substitutes: Burke, Coyne, Matthews, McGinley, O’Halloran, Ryan, Scott.
Referee: Robert Harvey.
Airtricity Premier Division
Bray Wanderers 0 Dundalk 0
Cork City 0 Bohemians 0
Drogheda United (Brennan 23) 1 Shamrock Rovers (Finn 10) 1
Limerick FC 0 Sligo Rovers (O’Connor 3) 1
St Patrick’s Athletic (Chambers 11, Fagan 41) 2 Athlone Town 0
Airtrcity Division One
Waterford United (Barrett 17, Doherty 44) 1 Finn Harp 0
Wexford Youths 0 Shelbourne 0