I shared a house/mortgage with my ex i no longer live there (iv been renting for a while) and she is selling the house a i will receive half of the equity (which will be used as a deposit on my new house).
What i need help with is as it not my main residence will i have to pay capital gains tax?
You do not have to pay CGT on the house for the time you were living there as it was your main residence during that time. Also you are allowed a further 3 years after moving out so you may not have any CGT to pay. If you moved out more than 3 years ago any gain will be assessed on a pro rata basis so that only part will be subject to CGT and you will have your annual allowance to set against this anyway.