Is there sin in Purgatory? My opinion is that the prevenient grace of God prevents all the holy souls in Purgatory from sinning. If souls in Purgatory were permitted to sin, then some might sin gravely, deserving eternal punishment in Hell. But we know that all the souls in Purgatory eventually enter eternal life in Heaven. If they were permitted to sin venially only, they would continually need to do more penance (suffer more), and would not enter Heaven.
Is there sin in Hell? My opinion is that the prevenient grace of God prevents all the reprobate souls in Hell from sinning. If souls in Hell could sin, they would sin mortally often because they are wicked. Then they would continually deserve more punishment, and their sufferings would increase continually forever. This plan would be contrary to the justice and mercy of God, to permit continual grave sins forever with ever increasing sufferings. So God’s grace prevents them from sinning.
However, the souls in Hell are in a state of perpetual blasphemy. They do not commit acts of blasphemy, but rather they are in the state of having rejected the love of God and neighbor, by final impenitence, which is called blasphemy against the Holy Spirit. But all the souls and devils in Hell are no longer able to sin at all. For the Justice of God has brought an end to their sins.
Please take a look at this list of my books and booklets, and see if any topic interests you.