Is there a way to unextrude like you can extrude?

Its very easy to extrude a face, just hold shift and drag.
For example if I was making a building in probuilder, I’d create a cube say 5x5. Then select a face and holding shift, drag in up say 20 units. I then decide I actually want it to be 15 units tall. How do I do that without undoing everything and starting over from the initial extrude.

I’m currently just creating an extra face and deleting it with edge loops.

For example, create an edge loop on the height so it’ll appear on the length. Section off 5 units. Do an extrude in the opposite direction down 5 units. Then backspace extra faces to remove them.

late reply but… ctrl + Z will revert you back