0

I have Elementory OS currently running on my PC. It is based on Debian-Ubuntu. I had recently run the command "apt-get upgrade" and downloaded 162 MB of data

Now I don't have an internet on another Computer and I want to install those "upgrades" manually to another PC but I don't know where those files are located. I suppose that I can copy the downloaded files(which were downloaded by Terminal) to another Computer and then simply install them on that computer. But, How can I do this, I mean where are the files(.deb packages) located? Is it possible to install all the packages at once?

1
  • man apt-cache is your friend. Jan 24, 2014 at 6:19

1 Answer 1

1

Its essential to download packages once but if you are reinstalling ubuntu on new machine you need not download these packages all over again if you have installed required packages on one of the machine you can use the content of below listed directory for installation /var/cache/apt/archives this directory contains the debian packages download by the apt-get.

So have fun reuse the content for each install and save time and bandwidth.

The syntax is as follows:

dpkg -i package-name-here.deb
dpkg --install package-name-here.deb
dpkg -i -R /path/to/dir/name/with/lots/of/dot-deb-files/
dpkg -i --recursive /path/to/dir/name/with/lots/of/dot-deb-files/

Where,

-i or --install : Install the package.
-R or --recursive : Recursively installed all *.deb files found at specified directories and all of its sub-directories. /path/to/dir/name/with/lots/of/dot-deb-files/ must refer to a directory instead of package-name-here.deb file name.

How do I install .deb file?

To install a single package file called /tmp/package.deb type the following commands. Open a terminal and then cd to directory where package.deb is kept. In this example, package.deb is kept in /tmp directory:

$ cd /tmp

Type the following command to install the package:

$ sudo dpkg -i package.deb

OR

# dpkg -i package.deb

Install all packages from /nfs/pkgs/ubuntu-builds directory

Recursively handle and install all regular files matching pattern *.deb found at /nfs/pkgs/ubuntu-builds/ directory and all of its subdirectories, type:

$ sudo dpkg -i -R /nfs/pkgs/ubuntu-builds/

OR

# dpkg -i -R /nfs/pkgs/ubuntu-builds/

follow all these commands and it will work for you.

1
  • This is what I was looking for, but its not a full answer. Check my question again, you will find that I asked - Is it possible to install all the packages at once. Jan 24, 2014 at 6:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .