Difference between revisions of "CentOS 8.x dnf basics"
(Created page with "<yambe:breadcrumb self="dnf basics">CentOS 8.x dnf or yum|dnf or yum</yambe:breadcrumb> =CentOS 8.x dnf basics= ==Install package== We can install package from online reposit...") |
m |
||
Line 1: | Line 1: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Package management|Package management]] > [[CentOS 8.x dnf or yum|dnf or yum]] > [[CentOS 8.x dnf basics|dnf basics]] | |||
==Install package== | ==Install package== | ||
Line 128: | Line 127: | ||
[[Main Page|Home]] > [[CentOS]] > [[CentOS 8.x]] > [[CentOS 8.x System Administration|System Administration]] > [[CentOS 8.x Package management|Package management]] > [[CentOS 8.x dnf or yum|dnf or yum]] > [[CentOS 8.x dnf basics|dnf basics]] |
Revision as of 03:46, 19 April 2022
Home > CentOS > CentOS 8.x > System Administration > Package management > dnf or yum > dnf basics
Install package
We can install package from online repositories using:
dnf install -y <package-name>
We can also install a local rpm file using:
dnf install -y ./<local-rpm-file-name>
Update system
We can update entire system using
dnf update -y --skip-broken
Download package rpm file
There is option to download package rpm file in current folder by using some dnf plugins. To enable that first install:
dnf install dnf-plugins-core
Then to download rpm file for a package use:
dnf download <package-name>
Remove package
To remove package use:
dnf remove <package-name>
List repositories
To list enabled repositories you can use
dnf repolist
To list all repositories use:
dnf repolist all
Search package
Search packages using:
dnf search <search-term>
Find package that provides given file
To see package that provides given file use:
dnf provides */<file-name>
See package information
To see package information use:
dnf info <package-name>
dnf history
To see dnf history information use:
dnf history
This should show information about all dnf invocations so far.
You can also see details of any particular listed item using:
dnf history info <id>
where <id> is taken from 'dnf history' output
There is also option of reversing transaction using:
dnf history undo <id>
After undo we can again perform same transaction again using:
dnf history redo <id>
Package groups
We can list package groups using:
dnf grouplist
Information about a group can be seen using:
dnf groupinfo "<group-name>"
Group can be installed using:
dnf groupinstall -y "<group-name>"
Refer:
Home > CentOS > CentOS 8.x > System Administration > Package management > dnf or yum > dnf basics