up vote 7 down vote favorite
3
share [g+] share [fb]

When we use

ubuntu apt-get

the first process is downloading the required files into a temporary folder

/var/cache/apt/archives

Installation will be done only after that. Can we able to migrate these files into a different system so that we can install those applications without using internet.

ie when typing following command

apt-get application-name

the system should take the required files from this temporary folder.

link|improve this question

feedback

3 Answers

up vote 6 down vote accepted

There are many other tools in the Apt family that can assist with managing packages.

  • apt-move can build a local "installed packages only" repository,
  • apt-cacher or apt-cacher-ng are caching proxies,
  • apt-proxy is another proxy and partial mirror builder,
  • apt-zip can update a non-networked computer using Apt and removable media (Zip here refers to the old 100MB floppy-like media, not the compression),
  • aptoncd creates CD-based repositories with packages downloaded by Apt

These are available as individual packages; for the most part, you'd install them on the machine with network access to the official Apt repositories, and use them to create package repositories on removable media (for apt-zip or aptoncd) or configure that machine to be a local repository that other machines on the local network can access (for the various proxies and apt-move).

As Broam points out in the comments, if you have differing architectures some of these will be more useful than others.

link|improve this answer
2  
and this is not to say you can't just reuse packages from /var/cache/apt/archives directly via dpkg. for one-off updates that's perfectly viable. but these are tools designed to automate the process and enable you to keep a network of Ubuntu machines updated. – quack quixote Feb 2 '10 at 7:08
feedback

Yes, you can do that. apt-get will look at cache folder first, and if the version of the package you wanna install is the same with the cache version, apt-get will use the cache version without going to internet

link|improve this answer
2  
If the systems are the same architecture (or the package is arch all). There's no point caching i386 packages for use on an amd64 system, etc. – Broam Feb 1 '10 at 15:09
feedback

two options i can think of - use dpkg to install the packages or use aptoncd

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.