Can an individual be legally compelled to demolish a dangerous building?

Yes, the local authority can legally order a person to demolish a dangerous building?