§1. The diocesan bishop freely appoints a vicar general and an episcopal vicar and can freely remove them, without prejudice to the prescript of can. 406. An episcopal vicar who is not an auxiliary bishop is to be appointed only for a time to be determined in the act of appointment.
§2. When a vicar general is absent or legitimately impeded, a diocesan bishop can appoint another to take his place; the same norm applies to an episcopal vicar.
Source: Code of Canon Law (Vatican.va)