man pages of
-d, --download-only Download only; package files are only retrieved, not unpacked or installed. Configuration Item: APT::Get::Download-Only. download download will download the given binary package into the current directory.
So what is the difference between the following commands:
apt-get download apache2 apt-get install --download-only apache2
And why the first one gives the following error:
Get:1 http://gr.archive.ubuntu.com/ubuntu bionic-updates/main amd64 apache2 amd64 2.4.29-1ubuntu4.2 [95,1 kB] Fetched 95,1 kB in 1s (102 kB/s) W: Download is performed unsandboxed as root as file '/home/pkaramol/Desktop/apache2_2.4.29-1ubuntu4.2_amd64.deb' couldn't be accessed by user '_apt'. - pkgAcquire::Run (13: Permission denied)