"Both parties have moved as quickly as they possibly can to tie up the loose ends," chairman Jeremy Peace said.
"We've reached an amicable agreement with Gary which means both he and the club can now move on.
"We want to thank Gary for his hard work over the past four-and-a-half years which has helped the club create a platform for what we hope will be sustainable Premiership football.
"We wish Gary all the best in his future managerial career."