Logo 
Search:

Unix / Linux / Ubuntu Forum

Ask Question   UnAnswered
Home » Forum » Unix / Linux / Ubuntu       RSS Feeds

Copy Packages

  Date: Dec 13    Category: Unix / Linux / Ubuntu    Views: 391
  

I need to copy packages I have installed, from one machine to another, both
running UBUNTU. I tried making a tar of /var and /share thinking that would get
all the files but must be missing something, there were several packages and
none show on the 2nd pc.

I'm stuck with 56k dial-up and don't want to download the packages again.

Share: 

 

6 Answers Found

 
Answer #1    Answered On: Dec 13    

Your question intrigued me so I did some research.

First of all, there is always an option to just download the files in
Synaptic, so one could save them that way. But where are they? On this
computer (running Linux Mint 6, but it seems to be the same on my Ubuntu
system) I found them at /var/cache/apt/archives. The names are somewhat
cryptic, so make careful note of what you are installing! I downloaded
Backgammon, which goes by gnubg.

In that same folder were several hundred other files, which I think are all
the other software I've ever installed, including lots of library files.
When I installed the Backgammon game by clicking on the main executable it
informed me that another file (containing data) would also be installed -
very handy.

Note that no matter how much you copy over from /var and /share you still
have to install the main .deb files on your other system. Many mysterious
changes are always required which only the installation can make and we
really don't need to know about. Fortunately the installer is easy to use
and works flawlessly as long as all the library files are there.

 
Answer #2    Answered On: Dec 13    

Hum if you are stuck with 56k dial-up only on the first PC,
there would be an easy solution :
from the first PC
sudo dpkg --get-selections > Packages.list

You copy that file *and* your actual /etc/apt/sources.list to
the second computer

Then
sudo dpkg --set-selections < Packages.list
sudo apt-get update
sudo apt-get dselect-upgrade

and the trick is done (provided your second PC has a fast connection)

 
Answer #3    Answered On: Dec 13    

Trouble is files will also be created inthe bin directories the etc directory
and several other places as well.

If you used synaptic or apt-get to install most of your packages and haven't
cleaned out the system then most of the install files should be still
in /var/cache/apt/archives.

One method and it is one I have used successfully in the past is to cp the
contents of that directory to a cd take it to the other computer copy it to
the same directory on that computer and run sudo apt-get update, then sudo
apt-get dist-upgrade to get the second system to the same state as the first
one and then just use synaptic to install the packages. With any luck the
will be little to actually download from the net. It works best of course if
the two systems are similar otherwise some packages may not be compatible
with the second system and it will need to download them.
Any packages you didn't install via this method, then hopefully you have kept
the downloads and can put them on the cd as well.

 
Answer #4    Answered On: Dec 13    

Take a look at the "AptonCD" package, in the "universe" repository.

Looks like it's tailor-made for this situation (which I'll be in,
myself, shortly - including dial-up...)

You can use it to make a CD containing the packages from your
/var/cache/apt/archives/. , which can then either be copied into the
same folder on the new machine, or mounted as a software source.

It won't do everything. For example, if you have the Adobe Flash
Player (nonfree), AptonCD will copy the installer - but the Flash
Player itself will have to be downloaded again from Adobe when the
installer runs.

 
Answer #5    Answered On: Dec 13    

I was going to recommend AptonCD. I use it to keep my downloads on a
DVD and works great. You can install from the CD or DVD the
applications you want to re-install. The process is manual not
automatic meaning you will have to select the desired apps at time of
install.

Any packages that are not open you should download to a file and make
a copy on CD for later use.

I have used tar to backup my system according to the forums on the
Ubuntu site, but I have to fix the grub after updating the system from
the image I have saved, I am sure there is a fix for this, the problem
I get is the UUID are a perfect match and my expermental system
conflicts with grub data.

 
Answer #6    Answered On: Dec 13    

The solution to this is rather easy. It was previously mentioned by someone
else. Copy the deb files manually from the apt folder to a storage medium such
as usb or CDROM and then install each one separately using gdebi (or kpackage is
better if it is installed as it can do it without giving your password each time
and you can use drag and drop. If you don't use KDE, Kpackage is still useful
for the ease of use in installing debs. It runs in Gnome just fine).

To use drag and drop with Kpackage, right click on any deb file and choose Open
with... Kpackage. Once Kpackage opens, click Install in the bottom right corner.
You will get another window open and click Install a second time. Provide your
password. This second window should be closed after installation but not the
first window. You can now drag and drop other debs to this first window and you
can now install without providing your password a second time. If you close the
first window, you must provide the password again. As long as it stays open you
can drag and drop to you heart's content. With Gdebi you must provide your
password for each one which can be annoying if you have lots to install.

This method (copying debs and installing separately) is easy for newbies
because: a) each deb file can be treated like a data file and can be copied (not
moved) as such; b) they should learn to use Gdebi or Kpackage anyway; and c) the
package manager will install and configure it without having to do anything from
the commandline which can be daunting for newbies.

 
Didn't find what you were looking for? Find more on Copy Packages Or get search suggestion and latest updates.




Tagged: