for debian systems. Ubuntu 18.04
1. Download The packages
On an internet connected system, download the packages you need.
apt-get install --download-only <package-name>
If you already have the package installed locally, you will need to add the –reinstall flag
apt-get install --download-only <package-name> --reinstall
2. Copy to the target system
The download-only options, puts the package and dependencies into
>/var/cache/apt/archives
Download the deb files and copy to your target system.
3. Install the packages
> dpkg -i <package-name>