In a proceeding relating to land, where it is necessary or expedient for the purposes of the proceeding, the Court at any stage of the proceeding may order that the whole or a part of the land be sold and may further order that a party in receipt of the rents or profits of the land or otherwise in possession of the land deliver possession to such person as the Court directs.