The court's attention was first drawn to the deportation centres last year when 11 detainees wrote to the chief justice and sought his intervention.
The court converted the letter into a public interest litigation.
The letter complained about the perennial shortage of drinking water and the low quality of food served to the foreigners.
Earlier, the court pulled up the government for its lax attitude towards the foreigners and appointed senior advocate Arvind Nigam as amicus curiae, who then inspected the camps and found that they lacked even basic amenities.