Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Is it safe to copy the package index files (which get updated when I run apt-get update) from one computer to another identical one? Basically, I've run apt-get update on one of them, and I don't want to have to run it again from the other computer because I have slow and limited internet. I've copied the packages in /var/cache/apt/archives from one system to another before, and it worked just fine; no download was necessary. I'd like to not have to update the package indexes as well.

I believe the index files are at /var/lib/apt/lists/

share|improve this question
add comment

2 Answers

Um, no, that's not really a safe thing to do. What I have done in the past is run the following on a "master" computer that has everything installed:

dpkg --get-selections > installed-software

Then ship the installed-software file around on a USB key or somesuch, running the following on each "slave" computer I want the same set of software on:

sudo dpkg --set-selections < installed-software
sudo dselect install

Hope this helps!

share|improve this answer
add comment

If you want only the installed software of the source system the best way to do this is using:

dpkg --get-selections | grep -v -E 'deinstall|hold' > installed-packages

Then in the target system run:

sudo dpkg --set-selections < installed-packages
sudo apt-get dselect-upgrade

This way you get sure that the target system don't get some packages uninstalled/holded.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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