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