Computer Tips - In installed a package with dnf and it pulled in lots of dependencies

Date: 2009nov23 OS: RedHat/Fedora/CentOS Q. In installed a package with dnf and it pulled in lots of dependencies (which is fine). But now I want to remove the package and its dependencies. How can I do that? A. You can use dnf's history feature. Do:
dnf history | head
to see a log of all installs. Note the number of the transaction you want to undo and enter:
dnf history undo <number>