The Catechism in Questions & Answers

544. How is it possible for souls in the beyond to change?

Souls in the beyond who have never heard of the gospel, never had their sins forgiven, and never received any of the sacraments find themselves in a condition of remoteness from God. This condition can only be overcome through belief in Jesus Christ and His sacrifice and by receiving the sacraments.