Short answer
You file a final Self Assessment return for the tax year you leave, claiming split year treatment if the conditions are met, and tell HMRC you have left the UK. HMRC will only close your record entirely once you have no further UK income or gains to report.






