When I invoke dnf5 history list | head -n2, I see:
ID Command line Date and time Action(s) Altered
154 dnf --enablerepo=*debug* install mesa-va-drivers-freeworld-debuginfo-25.0.4-1.fc42.x86_64 ffmpeg-libs-debuginfo-7.1.1-6.fc42.x86_64 vvenc-libs-debuginfo-1.13.1-3.fc42.x86_64 x264-libs-debuginfo-0.164-16.20231001git31e19f92.fc42.x86_64 x265-libs-debuginfo-4.1-2.fc42.x86_64 2025-05-21 13:48:34 17
However, invoking sudo dnf5 history rollback 154, I see:
[sudo] password for RokeJulianLockhart:
Updating and loading repositories:
Repositories loaded.
Nothing to do.
rollback 154 means “roll back to the state achieved by transaction 154” rather than “roll back transaction 154”.
So you perhaps want sudo dnf history rollback 153 (assuming that you don’t have any transactions after 154 - if so then you can’t reverse the effect of 154 while keeping the subsequent ones).