Random examples:
$ dnf install -y vim
$ dnf remove vim
$ dnf info vim
$ dnf autoremove
List pacakges:
$ dnf list avalable
$ dnf list installed
$ dnf list <package name>
$ dnf list <regex>
$ dnf list *libconfig*
$ dnf --showduplicates list <package name>
$ dnf whatprovides /bin/ps
Find the package with provides the file:
$ dnf whatprovides /bin/ps
$ dnf provides /bin/ps
List files in a package
repoquery -l <my_package>
repoquery -l vim
Downgrade a package:
$ dnf downgrade httpd-2.2.3-22.el5
Upgrade a package:
$ dnf update httpd-2.2.3
Update package cache:
S sudo dnf check-update
Execute a command without checking network repos:
$ sudo dnf -C <command>
$ sudo dnf -C --showduplicates gcc
Clean the cache. That is sometimes helpful to get just uploaded packages.
dnf clean all