§1. A person who wishes to leave an institute can depart from it when the time of profession has been completed.
§2. During the time of temporary profession, a person who asks to leave the institute for a grave cause can obtain an indult of departure from the supreme moderator with the consent of his or her council; in the case of an autonomous monastery, mentioned in can. 615, however, the bishop of the house of assignment must confirm the indult for it to be valid.
Source: Code of Canon Law (Vatican.va)