He returned to England in July 1838 and retired from the service in 1841. In 1866 he was appointed KCSI, and in 1871 a privy councillor. He died on 1 March 1881 at his London residence, 1 Stanhope Street, Hyde Park. In 1822 he married Catharine, daughter of William Greig of Thornhill in the county of Stirling.
