There's loads of stuff on the hmrc.gov.uk website about this. I'm in a similar situation so have done a bit of research but would advise you don't take my word for it!
Essentially, since it was once your primary residence, you have 3 years after you move out before you have to pay CGT. After that time, you only pay tax on the time it was not your home plus 36 months. The difference in price over the whole time counts, not just the gain over the taxable portion.
If you do have to pay tax, you get 10K personal allowance and then there is lettings allowance but I haven't worked that bit out yet.
So, to make a very boring story slightly less boring, you don't have to pay – but do your own research to make sure!
hope that helps
jon