[ root@test ~]# dnf help
usage: dnf [options] COMMAND
List of main commands:
alias List or create command aliases
autoremove removes all unnecessary packages that were originally installed due to dependencies
check Look for problems in the package database
check-update check if there is a package upgrade
clean delete cached data
deplist lists the dependencies of packages and the sources that provide these packages
distro-sync synchronizes the installed packages to the latest available version
downgrade downgrade package
group display or use group information
help displays a helpful usage information
history display or use transaction history
info displays detailed information about a package or package group
install installs one or more packages to the system
list lists one or a group of packages
makecache creates metadata cache
mark Mark or unmark the software package installed by the user in the installed software package.
module interacts with the module.
provides Find packages that provide specified content
reinstall reinstall a package
remove Remove one or more packages from the system
repolist displays the configured software repositories
repoquery searches for packages matching keywords
repository-packages run commands on all packages in the specified warehouse
search Search for the specified string in the package details
shell running interactive DNF terminal
swap runs an interactive DNF terminal to delete or install spec description files
updateinfo shows the recommendations of the package
upgrade upgrade one or more packages in the system
upgrade-Minimal upgrade, but only the "latest" software packages have fixed issues that may affect your system
Optional parameters:-c [config file],--config [config file]
Configuration file location
- q,--quiet silent execution
- v,--verbose detailed execution
- - version Display DNF version information and exit
- - installroot [path]Set the target root directory
- - nodocs do not install documentation
- - noplugins disable all plugins
- - enableplugin [plugin]
Enable the plugin with the specified name
- - disableplugin [plugin]
Disable the plugin with the specified name
- - releasever RELEASEVER
Covered in configuration files and warehouse files$the value of releasever
- - setopt SETOPTS set any configuration and warehouse options
- - skip-broken Solve dependency problems by skipping packages
- h,--help,--help-cmd
Show command help
- - allowerasing allows removal of installed packages when resolving dependencies
- b,--best Try the best package version in the transaction.
- C,--cacheonly runs completely from the system cache without upgrading the cache
- R [minutes],--randomwait [minutes]
Maximum command waiting time
- d [debug level],--debuglevel [debug level]
Debug output level
- - debugsolver dump detailed solution results to file
- - showduplicates in the list/Under the search command, display duplicate entries in the warehouse
- e ERRORLEVEL,--errorlevel ERRORLEVEL
Error output level
- - obsoletes enable dnf expiration processing logic for upgrade, or for info, list and repoquery
Display the function of package expired
- - rpmverbosity [debug level name]
rpm debug output level
- y,--assumeyes All questions are automatically answered as yes
- - assumeno all questions automatically answer no
- - enablerepo [repo]--disablerepo [repo]--repo [repo],--repoid [repo]
Enable warehouse with specified id or glob, you can specify multiple times
- - enable,--set-enabled
enable repos with config-manager command(automatically saves)--disable,--set-disabled
disable repos with config-manager command(automatically saves)-x [package],--exclude [package],--excludepkgs [package]
Exclude packages with full names or wildcards
- - disableexcludes [repo],--disableexcludepkgs [repo]
Disable excludepkgs
- - repofrompath [repo,path]
The mark and path to the additional warehouse can be specified multiple times.
- - noautoremove disables the removal of dependent packages that are no longer used
- - nogpgcheck disable gpg signature checking(if RPM policy allows)--color COLOR Configure whether to use color
- - refresh marks the metadata as expired before running the command.
- 4 Resolve only IPv4 addresses
- 6 Resolve only IPv6 addresses
- - destdir DESTDIR,--downloaddir DESTDIR
Set the directory to which the software package will be copied
- - downloadonly download only the package
- - comment COMMENT add a comment to the transaction
- - bugfix includes packages related to bug fixes in the update
- - enhancement Included in the update are software packages related to functional enhancements.
- - newpackage includes packages related to the new package in the update
- - security includes security-related software packages in the update
- - advisory ADVISORY,--advisories ADVISORY
Include the software packages necessary to fix the specified bulletin in the update
- - bzs BUGZILLA includes the packages necessary to repair a given BZ in the update
- - cves CVES includes the packages necessary to fix a given CVE in the update
- - sec-severity {Critical,Important,Moderate,Low},--secseverity {Critical,Important,Moderate,Low}
Include safety-related software packages matching a given safety level in the update
- - forcearch ARCH Force the use of an architecture installation package
Install software library
[ root@localhost ~]# dnf config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo
Adding repo from: https://download.docker.com/linux/centos/docker-ce.repo
Install docker
[ root@localhost ~]# dnf install -y docker-ce
Start docker
[ root@localhost ~]# systemctl enable docker
[ root@localhost ~]# systemctl start docker
Uninstall docker
[ root@localhost ~]# dnf -y remove docker-engine.x86_64
[ root@localhost ~]# rm -rf /var/lib/docker
Recommended Posts