If any dwelling is erected, constructed, altered, repaired, converted, maintained or used in violation of this chapter or of any ordinance or code adopted or any valid order or decision of the City or board made pursuant to any ordinance or code adopted, the City or board may institute any appropriate action or proceedings to prevent such unlawful erection, construction, reconstruction, alteration or use, to restrain, correct or abate such violation, to prevent the occupancy of the dwelling, or to prevent any illegal act, conduct or use in or about the premises of the dwelling.