Download packages with all dependencies for offline installation
First generate package download list using the following command:
$sudo apt-get install package-name
or
$apt-get --allow-unauthenticated -y install --print-uris package-name | cut -d -f2 | grep http:// > download-list
where replace package-name
Now to download the packages run the following command
$wget -c -i ./download-list
To generate package list for updating system use the following command:
$sudo apt-get update
$sudo apt-get upgrade --allow-unauthenticated -y --print-uris | grep -o http.* | tr "" " " > download-list
To install the downloaded packages from that folder run "sudo dpkg -i *.deb" from that directory.
download file now