I am using this trick for a long time and iirc, I have posted it earlier too.
Let say, you want to install package '
abc'.
Execute this
Code:
sudo apt-get -qq --print-uris install abc | cut -d\' -f 2 > package_links
Above code will create a file
package_links.
If you have Linux machine having internet access ( distro doesn't matter ), copy package_links and just execute this
Code:
wget -i < package_links
wget will download all packages listed in package_links file.
In case, you have Windows OS only, download packages listed in package_links file.
Copy those packages to
/var/cache/apt/archives folder.
Execute this to install package :
Code:
apt-get install abc
This method works fine for all Debian based distros.
So, 4 easy steps only.
- Create package_links file
- Download packages
- Move downloaded packages to /var/cache/apt/archives folder.
- Execute install command.