Monday, 16 December 2013

Download Deb Packages For Offline Installation On Multiples Machines

Linux is operating system where stability depends on updated software packages.Many of us install apps and updates daily on Ubuntu System.There is possibility that system may crash or get corrupted so it is best to have backup.If you want to install packages on multiple machines having same Operating system version you can save internet bandwidth and time by  downloading packages from one system and then copying those packages and installing on other similar machine having same Debian or Ubuntu version.

Following is the easy way to do it from terminal
Open terminal and Type following

sudo apt-get update

sudo apt-get --print-uris --yes install <pkg1> <pkg2>...<pkgN> | grep ^\' | cut -d\' -f2 > pkgsTobeDownloaded.txt

or for downloading Updates  

sudo apt-get --print-uris --yes install dist-upgrade | grep ^\' | cut -d\' -f2 > pkgsTobeUpdated.txt

After Downloading packages you can install packages by terminal 

sudo dpkg -i downloaded_package.deb 
sudo apt-get -f install

#this is necessary to fix dependencies errors

Alternatively, install gdebi-core, a command-line utility that lets you install local deb packages resolving and installing its dependencies. Once installed, you can install .deb packages like this:

sudo apt-get install gdebi-core
sudo gdebi abcpackage.deb

No comments:

Post a Comment