SAVE PACKAGE RPM or DEB

Save Package RPM

yum install namepackage --downloadonly --downloaddir=/opt/

Save Package DEB

apt-get download namepackage && apt-cache depends -i namepackage | awk '/Depends:/ {print $2}'| xargs apt-get download