在 Debian 生态里,fetch-debian(或常写作 fetchdebian)并不是一个“官方核心命令”,而是一个第三方辅助工具 / 脚本,主要用途是:从 Debian 官方源或镜像中批量下载 Debian 相关的软件包(.deb)及其依赖。
常见用途和特点如下:
nginx)适合:
常见支持:
示例用途:
下载 bookworm 的 amd64 的 nginx 及其全部依赖
| 工具 | 作用 |
|---|---|
| apt | 在线安装、更新、删除 |
| apt-get download | 只下载单个包(不自动拉依赖) |
| fetch-debian | 下载包 + 依赖,更适合离线场景 |
如果你没装 fetchdebian,也可以用官方方式:
apt-get install --download-only nginx
或
apt-get download $(apt-cache depends --recurse --no-recommends nginx | grep "^\w")
如果你说的是某个具体项目里的 fetchdebian(比如 GitHub 上的脚本),可以贴一下来源或命令,我可以更精确地解释。