LoginSignup
11
11

More than 5 years have passed since last update.

[apt] パッケージの事前ダウンロードを行う

Posted at

インストールは後で行いたいため、事前にパッケージだけダウンロードしておく方法のメモ。

-d, --download-only のオプションを使用すればよい。

packageの事前ダウンロード
$ sudo apt-get -d install <package name>
or
$ sudo apt-get --download-only install <package name>

使用例

パッケージの事前ダウンロード
$ sudo apt-get -d install gitlab-ce
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be upgraded:
  gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 161 not upgraded.
Need to get 270 MB of archives.
After this operation, 32.2 MB of additional disk space will be used.
Fetched 270 MB in 1min 14s (3,625 kB/s)
Download complete and in download only mode
$ ls /var/cache/apt/archives/
gitlab-ce_8.17.2-ce.0_amd64.deb  lock  partial

参考

debian - How do I download a package from apt-get without installing it? - Stack Overflow

11
11
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
11
11