>You don't remember what you installed.
There's no such issue with dnf, it has `dnf history` which, well, does what your utility do.
See what you've installed with `dnf history info ...`, undo with `dnf history undo ...`.
Labeled treats installations as isolated, logical tags rather than a single linear timeline. You can tear down session A while keeping sessions B and C completely intact, regardless of the order they were installed.
I usually just switch to systemd-nspawn --ephemeral containers derived from my host rootfs for such cases, not to pollute the rootfs at all.