Download a package using apt on Debian/Ubuntu
On Debian and Ubuntu servers, you can download a package using apt download command.
apt download PKG_NAME
Package will get downloaded to current working directory. Better do this to /tmp to avoid permission errors.
Method 2
If you want to download package and dependencies, then use
apt-get install --download-only PKG_NAME
This will download the package and all dependency, store it in folder /var/cache/apt/archives.
If you need to remove downloaded packages, run
apt clean
Seeapt-get