Linux command
dnf-download 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Download a package
dnf download [package]
Download to a specific directory
dnf download [package] --destdir [path/to/directory]
Download a package and all its dependencies
dnf download --resolve [package]
Download the source RPM
dnf download --source [package]
Print the URL
dnf download --url [package]
说明
dnf download downloads RPM packages from configured DNF repositories without installing them. It is part of the dnf-plugins-core package. Useful for obtaining packages for offline installation, inspection, or distributing to air-gapped systems.
参数
- --destdir _dir_
- Download destination directory. Defaults to the current directory.
- --url
- Print the download URL to stdout instead of downloading.
- --source
- Download the source RPM instead of the binary package. Enables source repositories automatically.
- --resolve
- Also download all uninstalled dependencies of the specified packages.
- --alldeps
- When used with --resolve, download all dependencies (including already installed ones).
- --arch _arch_
- Limit to packages of the given architecture.
FAQ
What is the dnf-download command used for?
dnf download downloads RPM packages from configured DNF repositories without installing them. It is part of the dnf-plugins-core package. Useful for obtaining packages for offline installation, inspection, or distributing to air-gapped systems.
How do I run a basic dnf-download example?
Run `dnf download [package]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --destdir _dir_ do in dnf-download?
Download destination directory. Defaults to the current directory.