His Life Comes First
According to a clever suggestion in Responsa VaYechi Yaakov (Y.D. 71), even if the reason for the prohibition is to repel mazikin, a departing tenant who can’t afford new mezuzos may take his mezuzos with him. After all, he is not required to live without mezuzos just in order to protect someone else (see Responsa Iggros Moshe, Y.D. 4:44; Responsa Minchas Yitzchak 9:106; Responsa Yabia Omer, Y.D. 3:18).