Whenever it shall be certified to the department by an officer or inspector of the department that any building or any part thereof in the city is infected with communicable disease, or by reason of want of repair has become dangerous to life or is unfit for human habitation because of defects in drainage, plumbing, ventilation, or the construction of the same, or because of the existence of a nuisance on the premises which is likely to cause sickness among its occupants, the department may issue an order requiring all persons therein to vacate such building or part thereof for the reasons to be stated therein. The department shall cause such order to be affixed conspicuously in such building or part thereof and to be personally served on the owner, lessee, agent, occupant, or any person having the charge or care thereof. If the owner, lessee or agent can not be found in the city or does not reside therein, or evades or resists service, then such order may be served by depositing a copy thereof in the post-office in the city, properly enclosed and addressed to such owner, lessee or agent, at his or her last known place of business and residence, and prepaying the postage thereon; such building or part thereof within ten days after such order shall have been so posted and mailed, or within such shorter time, not less than twenty-four hours, as in such order may be specified, shall be vacated, but the department whenever it shall become satisfied that the danger from such building or part thereof has ceased to exist, or that such building has been repaired so as to be habitable, may revoke such order.