Alex Hurst’s second-half goal helped York beat rock-bottom Torquay 1-0.
Hurst picked up the ball on halfway in the 71st minute and ran clear before firing under Gulls keeper Mark Halstead.
The goal allowed City to make amends for their disappointing reverse in the midweek derby with Halifax.
Prior to Hurst’s strike, Lenell John-Lewis had gone close for York and Maziar Kouhyar hit the bar, while a number of smart stops from Ethan Ross denied the visitors, most notably Aaron Jarvis and Chinwike Okoli.