Can a pope even be removed? As I recall, their election as Pope is supposed to be God inspired, so they are not allowed to remove one.
Ah - found this on line:
There is no process in current canon law for a pope to removed by anyone from his office. He can freely resign (as Benedict did) or he can die.
An ecumenical council can depose a pope, we know from history. But getting an ecumenical council together without a pope is seemingly impossible at this time.
A pope can be forcibly removed from office and exiled by military force, or by the intervention of a state power, but that is not considered licit. But had Napoleon or Hitler captured the pope and stuck him in a prison camp, he would have de facto been removed from the ability to exercise his office, at which point most popes would tender their resignation or have had some protocol put into place. Pius XII, for example, had prepared a letter of resignation for this eventuality under Hitler.
If a pope were an apostate - that is, if he lost his faith entirely in Christianity and/or converted to another religion altogether (Islam, Buddhism, et al.) then he would de facto cease to be bishop of Rome. Hopefully he would resign at that point as there is no mechanism for declaring him an apostate and removing him.
If a pope were a heretic - that is, in a formal and official way rejecting a dogma of the Christian faith, like the Trinity - then he could be tried by an ecumenical council, but the process for this is not outlined in canon law, only by historical consensus.
(Note that neither some uncredentialed armchair theologian or parish priest on facebook, nor a disgruntled retiree who never got the red hat he wanted, does not qualify to declare the pope a heretic).
There is no provision, though there probably should be, for a pope debilitated by some degenerative disease, or for popes to retire after a certain age or length of time in office.
Bottom line, it is up to the pope and to God when the pope’s time is done. No one else.