Nelson Mandela has been discharged from a hospital in Johannesburg where he spent two nights.
Surgeon General Vejaynand Ramlakan said Mr Mandela, 92, is suffering from ailments common to people his age, but was in high spirits and had been joking with family and nurses.
Deputy President Kgalema Motlanthe said: "Madiba is well."
On Friday, Mr Ramlakan said the former president had suffered a respiratory infection, but was responding well to treatment and would be receiving home-based care.
"To us he is stable, but will be subject to intense monitoring," he said.
A source close to Mr Mandela said he had had a collapsed lung.
After Mr Mandela's discharge, he was driven in an ambulance surrounded by a police convoy to his home in the suburb of Houghton.
During South Africa's apartheid regime, Mr Mandela was jailed for 27 years. While imprisoned at Robben Island he had tuberculosis.
He became South Africa's first black president in 1994 and stepped down after one term in 1999.
Correspondents say he has seemed increasingly frail since retiring from public life in 2004.
His last public appearance was at the FIFA World Cup closing ceremony last July.