dnf history list | headto see a log of all installs. Note the number of the transaction you want to undo and enter:
dnf history undo <number>
dnf history list | headto see a log of all installs. Note the number of the transaction you want to undo and enter:
dnf history undo <number>