The authorities were also directed to import and spray effective insecticide without delay to stop the spread of the mosquito-borne dengue fever.
The city corporations have been told to submit a report on the progress of the initiatives taken under the order on Aug 20.
Justice FRM Nazmul Ahasan and Justice KM Kamrul Kader passed the order on Wednesday after a hearing on the measures implemented by the city corporations and its effectiveness in combatting the spread of dengue fever.
The state was represented by Attorney General Mahbubey Alam and Deputy Attorney General ABM Abdullah Al Mahmud Bashar.
According to the court, the spread of dengue fever has reached epidemic proportions.
"We had asked you to take measures against the (Aedes) mosquitos but you didn't," the court said.
“Around 21-22 people have died from dengue but even then the city corporations are saying, ‘It's nothing.' The mayor says, ‘nothing's happened.' Around 21-22 people have died, thousands of others are sick -- change your approach."