This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux:yum_dnf [2021/01/01 21:25] 127.0.0.1 external edit |
linux:yum_dnf [2025/08/23 23:47] (current) |
||
---|---|---|---|
Line 5: | Line 5: | ||
==== Overview ==== | ==== Overview ==== | ||
- | <fc #337dff>/etc/dnf/dnf.conf</fc> DNF configuration file\\ | + | /etc/dnf/dnf.conf DNF configuration file\\ |
- | <fc #337dff>/etc/yum.repos.d</fc> all repo files | + | /etc/yum.repos.d all repo files |
==== List ==== | ==== List ==== | ||
- | <fc #337dff>dnf list --all</fc> list all installed and available packages\\ | + | **dnf list --all** list all installed and available packages\\ |
- | <fc #337dff>dnf list expression</fc> list packages matching expression\\ | + | **dnf list expression** list packages matching expression\\ |
- | <fc #337dff>dnf list --installed expression</fc> list installed packges matching expression\\ | + | **dnf list --installed expression** list installed packges matching expression\\ |
- | <fc #337dff>dnf list --available expression</fc> list available packages matching expression\\ | + | **dnf list --available expression** list available packages matching expression\\ |
- | <fc #337dff>dnf list --extras expression</fc> list extras packages matching expression\\ | + | **dnf list --extras expression** list extras packages matching expression\\ |
- | <fc #337dff>dnf list --obsoletes expression</fc> list obsoletes packages matching expression\\ | + | **dnf list --obsoletes expression** list obsoletes packages matching expression\\ |
- | <fc #337dff>dnf list --recent expression</fc> list recent packages matching expression\\ | + | **dnf list --recent expression** list recent packages matching expression\\ |
- | <fc #337dff>dnf list --upgrades expression</fc> list upgrades available for packges matching expression\\ | + | **dnf list --upgrades expression** list upgrades available for packges matching expression\\ |
- | <fc #337dff>dnf list --autoremove</fc> list orphaned packages | + | **dnf list --autoremove** list orphaned packages |
==== Info ==== | ==== Info ==== | ||
- | <fc #337dff>dnf info package_name</fc> show info of package_name\\ | + | **dnf info package_name** show info of package_name\\ |
- | <fc #337dff>dnf provides path/to/file</fc> show which package provides /path/to/file | + | **dnf provides path/to/file** show which package provides /path/to/file |
==== Search ==== | ==== Search ==== | ||
- | <fc #337dff>dnf search term</fc> search for term in package name and summary | + | **dnf search term** search for term in package name and summary |
==== Download ==== | ==== Download ==== | ||
- | <fc #337dff>dnf install dnf-plugins-core</fc> install dnf core plugins\\ | + | **dnf install dnf-plugins-core** install dnf core plugins\\ |
- | <fc #337dff>dnf download package</fc> download package | + | **dnf download package** download package |
==== Install ==== | ==== Install ==== | ||
- | <fc #337dff>dnf install package_name</fc> install package and dependencies\\ | + | **dnf install package_name** install package and dependencies\\ |
- | <fc #337dff>dnf install /path/to/local/rpm</fc> install local package and dependencies\\ | + | **dnf install /path/to/local/rpm** install local package and dependencies\\ |
- | <fc #337dff>dnf install /path/to/fil</fc>e install package which provides /path/to/file\\ | + | **dnf install /path/to/fil**e install package which provides /path/to/file\\ |
- | <fc #337dff>dnf reinstall package_name</fc> reinstall package and dependencies\\ | + | **dnf reinstall package_name** reinstall package and dependencies\\ |
- | <fc #337dff>dnf downgrade package_name</fc> downgrade package\\ | + | **dnf downgrade package_name** downgrade package\\ |
- | <fc #337dff>dnf mark install package_name</fc> marks the specified packages as installed by user.\\ | + | **dnf mark install package_name** marks the specified packages as installed by user.\\ |
- | <fc #337dff>dnf unmark remove package_name</fc> unmarks the specified packages as installed by user\\ | + | **dnf unmark remove package_name** unmarks the specified packages as installed by user\\ |
- | <fc #337dff>dnf mark group package_name</fc> marks the specified packages as installed by group | + | **dnf mark group package_name** marks the specified packages as installed by group |
==== History ==== | ==== History ==== | ||
- | <fc #337dff>dnf history list</fc> list dnf transactions history\\ | + | **dnf history list** list dnf transactions history\\ |
- | <fc #337dff>dnf history info transaction</fc> show info of particular transaction\\ | + | **dnf history info transaction** show info of particular transaction\\ |
- | <fc #337dff>dnf history redo transaction</fc> redo particular transaction\\ | + | **dnf history redo transaction** redo particular transaction\\ |
- | <fc #337dff>dnf history rollback transaction</fc> rollback particular transaction\\ | + | **dnf history rollback transaction** rollback particular transaction\\ |
- | <fc #337dff>dnf history undo transaction</fc> undo particular transaction\\ | + | **dnf history undo transaction** undo particular transaction\\ |
- | <fc #337dff>dnf history userinstalled</fc> show all installonly packages, packages installed outside of DNF and packages not installed as dependency | + | **dnf history userinstalled** show all installonly packages, packages installed outside of DNF and packages not installed as dependency |
==== Update ==== | ==== Update ==== | ||
- | <fc #337dff>dnf check-update</fc> check if updates available\\ | + | **dnf check-update** check if updates available\\ |
- | <fc #337dff>dnf upgrade</fc> update packages to latest version\\ | + | **dnf upgrade** update packages to latest version\\ |
- | <fc #337dff>dnf upgrade-minimal</fc> update packages to major patchset and security\\ | + | **dnf upgrade-minimal** update packages to major patchset and security\\ |
- | <fc #337dff>dnf distro-sync</fc> update packages to latest version | + | **dnf distro-sync** update packages to latest version |
==== Repository ==== | ==== Repository ==== | ||
- | <fc #337dff>dnf repolist --enabled|--disabled|--all</fc> lists enabled, disabled or all known repositories\\ | + | **dnf repolist --enabled|--disabled|--all** lists enabled, disabled or all known repositories\\ |
- | <fc #337dff>dnf repoquery</fc> searches the available DNF repositories for selected packages\\ | + | **dnf repoquery** searches the available DNF repositories for selected packages\\ |
- | <fc #337dff>dnf repository-packages</fc> run commands on top of all packages in the repository\\ | + | **dnf repository-packages** run commands on top of all packages in the repository\\ |
- | <fc #337dff>dnf config-manager --add-repo=URL</fc> add remote repository | + | **dnf config-manager --add-repo=URL** add remote repository |
==== Group ==== | ==== Group ==== | ||
- | <fc #337dff>dnf group summary group</fc> show overview of how many groups are installed and available\\ | + | **dnf group summary group** show overview of how many groups are installed and available\\ |
- | <fc #337dff>dnf group info group</fc> show package lists of a group\\ | + | **dnf group info group** show package lists of a group\\ |
- | <fc #337dff>dnf group install --with-optional group</fc> install packages the group contains\\ | + | **dnf group install --with-optional group** install packages the group contains\\ |
- | <fc #337dff>dnf group list group</fc> list all matching group\\ | + | **dnf group list group** list all matching group\\ |
- | <fc #337dff>dnf group remove group</fc> remove those packages in the group\\ | + | **dnf group remove group** remove those packages in the group\\ |
- | <fc #337dff>dnf group upgrade group</fc> upgrades the packages from the group and upgrades the group itself | + | **dnf group upgrade group** upgrades the packages from the group and upgrades the group itself |
==== Uninstall ==== | ==== Uninstall ==== | ||
- | <fc #337dff>dnf remove package_name</fc> uninstall package_name\\ | + | **dnf remove package_name** uninstall package_name\\ |
- | <fc #337dff>dnf autoremove</fc> uninstall orphaned packages | + | **dnf autoremove** uninstall orphaned packages |
===== YUM ===== | ===== YUM ===== | ||
Line 86: | Line 86: | ||
==== Overview ==== | ==== Overview ==== | ||
- | <fc #337dff>/etc/yum.conf</fc> YUM configuration file\\ | + | **/etc/yum.conf** YUM configuration file\\ |
- | <fc #337dff>/etc/yum.repos.d</fc> all repo files | + | **/etc/yum.repos.d** all repo files |
==== List ==== | ==== List ==== | ||
- | <fc #337dff>yum list</fc> List package names from repositories\\ | + | **yum list** List package names from repositories\\ |
- | <fc #337dff>yum list available</fc> List all available packages\\ | + | **yum list available** List all available packages\\ |
- | <fc #337dff>yum list installed</fc> List all installed packages\\ | + | **yum list installed** List all installed packages\\ |
- | <fc #337dff>yum list all</fc> List installed and available packages\\ | + | **yum list all** List installed and available packages\\ |
- | <fc #337dff>yum list kernel</fc> List installed and available kernel packages\\ | + | **yum list kernel** List installed and available kernel packages\\ |
==== Info ==== | ==== Info ==== | ||
- | <fc #337dff>yum info vsftpd</fc> List info about vsftpd package\\ | + | **yum info vsftpd** List info about vsftpd package\\ |
==== Search ==== | ==== Search ==== | ||
- | <fc #337dff>yum search samba</fc> Find packages with samba in name or description | + | **yum search samba** Find packages with samba in name or description |
- | ==== Download ==== | + | ==== Downgrade ==== |
- | + | ||
- | <fc #337dff>dnf install dnf-plugins-core</fc> install dnf core plugins\\ | + | |
- | <fc #337dff>dnf download package</fc> download package | + | |
- | + | ||
- | ==== Install ==== | + | |
- | + | ||
- | <fc #337dff>dnf install package_name</fc> install package and dependencies\\ | + | |
- | <fc #337dff>dnf install /path/to/local/rpm</fc> install local package and dependencies\\ | + | |
- | <fc #337dff>dnf install /path/to/fil</fc>e install package which provides /path/to/file\\ | + | |
- | <fc #337dff>dnf reinstall package_name</fc> reinstall package and dependencies\\ | + | |
- | <fc #337dff>dnf downgrade package_name</fc> downgrade package\\ | + | |
- | <fc #337dff>dnf mark install package_name</fc> marks the specified packages as installed by user.\\ | + | |
- | <fc #337dff>dnf unmark remove package_name unmarks the specified packages as installed by user\\ | + | |
- | <fc #337dff>dnf mark group package_name</fc> marks the specified packages as installed by group | + | |
- | + | ||
- | ==== History ==== | + | |
- | + | ||
- | <fc #337dff>dnf history list</fc> list dnf transactions history\\ | + | |
- | <fc #337dff>dnf history info transaction</fc> show info of particular transaction\\ | + | |
- | <fc #337dff>dnf history redo transaction</fc> redo particular transaction\\ | + | |
- | <fc #337dff>dnf history rollback transaction</fc> rollback particular transaction\\ | + | |
- | <fc #337dff>dnf history undo transaction</fc> undo particular transaction\\ | + | |
- | <fc #337dff>dnf history userinstalled</fc> show all installonly packages, packages installed outside of DNF and packages not installed as dependency | + | |
- | + | ||
- | ==== Update ==== | + | |
- | + | ||
- | <fc #337dff>dnf check-update</fc> check if updates available\\ | + | |
- | <fc #337dff>dnf upgrade</fc> update packages to latest version\\ | + | |
- | <fc #337dff>dnf upgrade-minimal</fc> update packages to major patchset and security\\ | + | |
- | <fc #337dff>dnf distro-sync</fc> update packages to latest version | + | |
- | + | ||
- | ==== Repository ==== | + | |
- | + | ||
- | <fc #337dff>dnf repolist --enabled|--disabled|--all</fc> lists enabled, disabled or all known repositories\\ | + | |
- | <fc #337dff>dnf repoquery</fc> searches the available DNF repositories for selected packages\\ | + | |
- | <fc #337dff>dnf repository-packages</fc> run commands on top of all packages in the repository\\ | + | |
- | <fc #337dff>dnf config-manager --add-repo=URL</fc> add remote repository | + | |
- | + | ||
- | ==== Group ==== | + | |
- | + | ||
- | <fc #337dff>dnf group summary group</fc> show overview of how many groups are installed and available\\ | + | |
- | <fc #337dff>dnf group info group</fc> show package lists of a group\\ | + | |
- | <fc #337dff>dnf group install --with-optional group</fc> install packages the group contains\\ | + | |
- | <fc #337dff>dnf group list group</fc> list all matching group\\ | + | |
- | <fc #337dff>dnf group remove group</fc> remove those packages in the group\\ | + | |
- | <fc #337dff>dnf group upgrade group</fc> upgrades the packages from the group and upgrades the group itself | + | |
- | + | ||
- | ==== Uninstall ==== | + | |
- | + | ||
- | <fc #337dff>dnf remove package_name</fc> uninstall package_name\\ | + | |
- | <fc #337dff>dnf autoremove</fc> uninstall orphaned packages | + | |
+ | **yum downgrade packagename** downgrade a specific package\\ | ||