Purgatory was one of the doctrines the Reformers reacted most strongly against, though many Reformers claimed Augustine of Hippo as being in agreement with their theology. Did Augustine teach a doctrine of purgatory?
It appears that Augustine believed that purgatory was real, but didn't believe the matter was settled.
His agnosticism seems clearest in this passage:
It is a matter that may be inquired into, and either ascertained or left doubtful, whether some believers shall pass through a kind of purgatorial fire, and in proportion as they have loved with more or less devotion the goods that perish, be less or more quickly delivered from it. (Handbook on Faith, Hope and Love, 69 [421-422])
He appears to affirm it while recounting his mother's death:
To us both [my brother and I] she says, "Lay this body anywhere, let not the care for it trouble you at all. This only I ask, that you will remember me at the Lord's altar, wherever you be."
I then, O my Praise and my Life, Thou God of my heart, putting aside for a little her good deeds, for which I joyfully give thanks to You, do now beseech You for the sins of my mother. Hearken unto me, through that Medicine of our wounds who hung upon the tree, and who, sitting at Your right hand, "makes intercession for us." ... Forgive her, O Lord, forgive her, I beseech You; enter not into judgment with her. Let Your mercy be exalted above Your justice. (Confessions, IX.27,35 [397-401])
But he then goes on to say, "And I believe You have already done that which I ask You," (36) which is not entirely clear, but could be interpreted as a statement against purgatory.
At any rate, however, he makes many statements in his writings either in direct support of a "purgatorial fire" or of making "intercession for the dead." In The City of God, he makes statements supporting both within a few paragraphs of each other (see below), indicating that the ideas were connected in his thought.
For more on the development of Augustine's thought with regard to the doctrine of purgatory, see The Birth of Purgatory by Jacques Le Goff, in particular the chapter on the church fathers.
The man who perhaps has not cultivated the land and has allowed it to be overrun with brambles has in this life the curse of his land on all his works, and after this life he will have either purgatorial fire or eternal punishment. (The Literal Interpretation of Genesis, 2:20 [388/389])
Cleanse me in this life, and make me such, that I may after that stand in no need of the cleansing fire, for those "who are to be saved, yet so as by fire." (1 Corinthians 3:15) ... For all that, though we should be saved by fire, yet will that fire be more grievous than anything that man can suffer in this life whatsoever. (Exposition on Psalm 38, 2 [date unknown; 396~420)
Of those who suffer temporary punishments after death, all are not doomed to those everlasting pains which are to follow that judgment. (The City of God 21:13 [413-427])
Prayers for the dead
The souls of the pious dead are not separated from the Church, which even now is the kingdom of Christ; otherwise there would be no remembrance made of them at the altar of God in the partaking of the body of Christ. (The City of God 20:9 [413-427])
The prayer either of the Church herself or of pious individuals is heard on behalf of certain of the dead; but it is heard for those who, having been regenerated in Christ, did not for the rest of their life in the body do such wickedness that they might be judged unworthy of such mercy, nor who yet lived so well that it might be supposed they have no need of such mercy. (The City of God 21:24 [413-427])
In the books of the Maccabees we read of sacrifice offered for the dead. Howbeit even if it were no where at all read in the Old Scriptures, not small is the authority, which in this usage is clear, of the whole Church, namely, that in the prayers of the priest which are offered to the Lord God at His altar, the Commendation of the dead has also its place. (On the Care of the Dead, 3 [420-422])
Church custom has it that at the place where the names of the martyrs are recited at God's altar, we don't pray for them, while we do pray for the other departed brothers and sisters who are remembered there. It is insulting, I mean, to pray for martyrs, to whose prayers we ought rather to commend ourselves. (Sermon 159:1 )
There is no doubt that the dead are helped by the prayers of holy Church, by the saving sacrifice, and by alms dispensed for their souls; these things are done that they may be more mercifully dealt with by the Lord than their sins deserve. The whole Church observes the custom handed down by our fathers: that those who died within the fellowship of Christ’s body and blood should be prayed for when they are commemorated in their own place at the holy sacrifice, and that we should be reminded that this sacrifice is offered for them as well. (Sermon 172:2 [date unknown; 393~430])
Dates come from this book list, other than for sermon 159, which comes from the linked book.