Cabinet Secretary Sir Gus O\'Donnell, the head of the civil service, is to leave his post by the end of the year.He had previously been reported as saying he would step down before the next general election.Sir Gus worked as John Major\'s spokesman in the mid-1990s. He later worked as permanent secretary at the Treasury during Gordon Brown\'s time as chancellor before moving to No 10.No 10 permanent secretary Jeremy Heywood will become cabinet secretary.Sir Gus\'s retirement on 31 December signals a major overhaul at the top of the civil service with the role being carved into three parts.Mr Heywood will become cabinet secretary and the prime minister\'s principal policy advisor - but not head of the civil service.That role will be taken over by a permanent secretary from within Whitehall after an interview process.Mr Heywood will also not be the permanent secretary for the Cabinet Office, a role that will be taken on by former Football Association chief executive Ian Whatmore, who is already working as the senior civil servant in the Cabinet Office.The BBC\'s chief political correspondent Norman Smith said Sir Gus had been a \"long-standing, highly-regarded\" figure in Whitehall.He described him as a \"classic mandarin\" who was a \"permanent fixture at the highest echelons of government\".