How to download package not install it with apt-get command

aptdownload

sudo apt-get install pppoe

will download pppoe package and install it.

Is it possible to just download pppoe package and not install it with apt-get command?

wget http://ftp.us.debian.org/debian/pool/main/p/ppp/ppp_2.4.7-1+4_amd64.deb

ppp_2.4.7-1+4_amd64.deb is in the current directory now.

cd  /tmp
sudo  apt-get install  -d  ppp
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  ppp
0 upgraded, 1 newly installed, 0 to remove and 95 not upgraded.
Need to get 0 B/346 kB of archives.
After this operation, 949 kB of additional disk space will be used.
Download complete and in download only mode

No ppp_2.4.7-1+4_amd64.deb or ppp related package in /tmp.

sudo  find  /tmp  -name  ppp*

Nothing found.

Where is the package ppp in /tmp with command

cd  /tmp
sudo  apt-get install  -d  ppp

??

Best Answer

Use --download-only:

sudo apt-get install --download-only pppoe

This will download pppoe and any dependencies you need, and place them in /var/cache/apt/archives. That way a subsequent apt-get install pppoe will be able to complete without any extra downloads.

Related Question