I used the following in steps in Ubuntu (can be used in any Debian based system) to install software using off line system.
1. Edit /etc/apt/source.lst to enable repositories you need. The following link gives you details on repositories (https://help.ubuntu.com/community/Repositories/Ubuntu). Read this first if you want to know more about repos (you will be offline when doing real stuff.)
2. Create a list of URLs that will download repository meta data. These files contain a list of all software available on the repository and their dependencies.
apt-get -qq --print-uris update | awk '{print $1}' | sed "s/'//g" > download
I will not go on to explain what the command does. But after executing the command the download file will contain a list of urls you need to download.
I will not go on to explain what the command does. But after executing the command the download file will contain a list of urls you need to download.
3. Download these files using a internet enabled machine. (use wget on Windows or Linux, use the url list).
4. Copy the downloaded files into /var/lib/apt/lists/. This will make the offline computer knowledgeable about the contents of the repositories. (These days the files are bzipped to save space and you may need to unzip them)
5. Now generate a list of all dependant files in the offline Linux box using
apt-get install -qq --print-uris < package_to_install> | awk '{print $1}' | sed "s/'//g" > packages
6. Download these files and copy them into /var/cache/apt/archives/
7. Know since all files are there install them.
6. Download these files and copy them into /var/cache/apt/archives/
7. Know since all files are there install them.
apt-get install < package_to_install>
You will only need to follow steps 5 through 7 after the initial work is done.
PS: I used this method when I was a University student, where mobile broadband was not so common, expensive (may for a University student). It seems know for most students this is affordable. Yet these steps are useful if you want to speed up a installation by using the cached .deb files.