Now, I’m aware that Revelation is a prophetic apocalyptic book, and by its very nature is bound to contain symbolism, imagery, and to employ other literary devices. All quotes from Scripture will be using a Holy See-approved Bible (here).
In Revelation 21:8, the one who sits on the throne, God Himself (cf. Rev. 4:1-11) says:
But as for cowards, the unfaithful, the depraved, murderers, the unchaste, sorcerers, idol-worshipers, and deceivers of every sort, their lot is in the burning pool of fire and sulfur, which is the second death… (21:8)
So this is pretty obvious: all of the listed groups will burn in the second death. (See also: 20:10; 20:14-15) Then the New Jerusalem is introduced in detailed (the full thing is 21:10-27):
He took me in spirit to a great, high mountain and showed me the holy city Jerusalem coming down out of heaven from God. It gleamed with the splendor of God. Its radiance was like that of a precious stone, like jasper, clear as crystal. (21:10-11)
However, Revelation 22:15 (and 21:27) imply that there is still sin (outside of the lake of fire, the second death) and that there are still those who sin:
Outside are the dogs, the sorcerers, the unchaste, the murderers, the idol-worshipers, and all who love and practice deceit. (22:15)
So, even after the unjust dead were resurrected, there is apparently still impurity, or the potential for impurity and sin. But isn’t all of the impurity in the second death, the lake of fire?