Related pages
| Command | Objective | Example |
|---|---|---|
| dnf -h | ||
| dnf check | check rpm database It will take a lot of time. | |
| dnf clean all | Clean all cached files from any enabled repository. |
| Command | Objective |
|---|---|
| dnf repolist ← only enable repository dnf repolist all | Check Repository |
| dnf-config-manager | Check Configuration |
| dnf-config-manager --enable REPO_NAME | Enable Reposigory |
| dnf-config-manager --disable-repo REPO_NAME | Disable repository |
| dnf-config-manager --add-repo REPO_URL | Add Repository |
| Command | Objective | Example |
|---|---|---|
| dnf search STRINGS dnf search PACAGE --showduplicates | Find any packages matching a string | dnf search mysql dnf search apache dnf search httpd --showduplicates --releasever=8.6t |
| dnf provides COMMAND/LIBRARY | dnf provides nping dnf provides libstdc++.so.5 dnf provides libgcc_s.so.1 |
|
| dnf whatprovides XXXXX | dnf whatprovides libstdc++.so.5 | |
| dnf info PACAGE | Check Name, Arch, Version, Release, Description etc | dnf info lxc |
| dnf deplist PACAGE | check the dependences of the packages | dnf deplist vnc-server dnf deplist tree |
| dnf check-update | Checks whether updates exist for packages that are already installed on your system. | |
| dnf list | Lists all packages that are available in all enabled repositories and all packages that are installed on your system. You can confirm all rpm version. | dnf list |grep httpd |
| dnf list available | dnf --disablerepo="*" --enablerepo="spp" list available | |
| dnf list extras | ||
| dnf list installed | It lists all the packages installed on the system. You can confirm rpm version. | dnf list installed |grep opensshrpm -qa --last | less← How to check installed packege order by installed date |
| dnf list updates | It lists the packages you can update You can confirm rpm version. | dnf list updates |grep openssh |
| Command | Objective | Example |
|---|---|---|
| dnf install PACKAGE dnf -y install PACKAGE | ||
| dnf reinstall PACKAGE | ||
| dnf localinstall XXXX.rpm | ||
| dnf remove PACKAGE | ||
| dnf update ← update all packages dnf update PACKAGE ← update only a package | ||
| dnf upgrade dnf upgrade PACKAGE | upgrade is the same as the update command with the --obsoletes flag set. | dnf upgrade --releasever=8.6 dnf upgrade zlib --releasever=8.6 |
| dnf download PACKAGE |
dnf update PACKAGE <- update only a package
dnf update <- update all packages dnf upgrade
upgrade is the same as the update command with the –obsoletes flag set.
dnf update --obsoletes = dnf upgrade
The obsoletes option automatically removes packages that you no longer need.
obsoletes=1 #Enable obsoletes option
dnf update = dnf upgrade
| Command | Objective | Example |
|---|---|---|
| dnf groups list (RHEL 7-) dnf groups list hidden dnf grouplist (- RHEL6) dnf --noplugins groups list -v | Lists installed groups and groups | |
| dnf groupinfo "GROUPNAME" | Displays detailed information about a group. | |
| dnf groupinstall "GROUPNAME" | Installs all the packages in a group. | dnf groupinstall "X Window System" dnf groupinstall "GNOME Desktop Environment" |
| dnf groupremove "GROUPNAME" | Removes all the packages in a group. | |
| dnf groupupdate "GROUPNAME" | Updates all the packages in a group. |
| Command | Objective | Example |
|---|---|---|
| dnf history list all dnf history info N | dnf history list all dnf history info 8 |
export http_proxy=http://192.168.0.10:9999/ export https_proxy=http://192.168.0.10:9999/
[main] export http_proxy=http://192.168.0.10:9999/
[main] proxy=http://xx.xx.xx.xx:8080 proxy_username=username proxy_password=password
# grep -E "\[*\]|name|baseurl" /etc/dnf.repos.d/*.repo
# dnf --disablerepo=* --enablerepo=test-repo repolist
# dnf --disablerepo=* --enablerepo=remi,epel search httpd