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