Purgatory is an unscriptural belief. It did not exist in christian belief before Pope Pius IV solidified its position in Catholic doctrine.
The idea that a soul is subject to temporary punishment goes against what the Bible really teaches.
Immortality of the soul was not something that Jesus or any of the early Jews believed. In fact, the Hebrew scriptures and Jesus himself teach the exact opposite: “The living are conscious that they will die; but as for the dead, they are conscious of nothing at all. Also, their love and their hate and their jealousy have already perished, and they have no portion anymore to time indefinite in anything that has to be done under the sun.” (Eccl. 9:5,6)
The dead man has no more thoughts anywhere: “His spirit goes out, he goes back to his ground, in that day his thoughts do perish.” Where there is no conscious existence, no thought, there can be no pain or suffering, in other words, no purgatory.—Ps. 146:4.
Do remember that this does not mean that the resurrection of which Jesus taught will not happen. That's one of the wonderful promises which the Bible holds out to faithful mankind.