How To Install Packages On Ubuntu Offline

How To Install Packages On Ubuntu Offline Average ratng: 3,7/5 862 votes

This tutorial is intended for all those who have installed Ubuntu on a computer that has no Internet connection, but who would like nevertheless maintain their system up to date and install the applications they lack.

For similar needs, I run a small virtual machine in my windows machine. To download packages without installing you can use apt-get download. The command will download the package to the directory that you run the command. You can then copy the packages to the host, then a flash drive, lastly to the machine that you use. I know this may not be the most elegant solution but at least works for me. Oh, I forgot: If you need dependency checking, you can run apt-get -s install, copy the dependency line and just paste to apt-get download command.

Update 2: I looked to the manpage of the apt-get. It has a switch called --download-only. You can pass this to install & apt-get will get all the packages for you but won't install them. Sai ram sai shyam sai bhagwan shirdi ke daata. You can find your packages in /var/cache/apt/archives.

An occasional apt-get clean will delete the files from the directory, so you can get the packages you want easily. Update 3: To install the packages obtained with method in Update 2, you need to put these packages again in /var/cache/apt/archives in the offline machine. If you want to install packages you got with apt-get download, you can use dpkg -i.