In May 1814, Ruffo returned to Rome where the population and the College of Cardinals received him with indifference, so that he decided to move towards to Naples and to establish there. On February 8, 1815, Pope Pius VII recalled Ruffo in Rome and appointed him Prefect of the Annona and of Grascia, to say, responsible of the procurement of meat, fat, and oil. On May 8, 2017, he become Great Prior of the Order of Malta within the Pontifical State. From 29 March 1819 to 21 February 1820, he was Camerlengo of the Holy Roman Church until his appointing in the of Prefect of the Congregation for Water, Pontine Marshes and of Chiani. In March 1821, he came back to Naples, which was afflicted by the popular rebellion against the Austrian military forces. On June 27, he chose the diacony of Santa Maria in Via Lata and hold the title of Cardinal Protodeacon. In August 1823, Ruffo took part to papal conclave which elected Pope Leo XII. At the end of the year, Ruffo went back to Naples.