Ubuntu – Backup Software Sources


In Ubuntu 10.04, when I goto System > Administration > Software Sources and goto the Authentication tab, I can view all of my keys allowing me to download from third party sources.

How would I back this up to copy all of my sources and keys to a new system?

Best Answer

The method to backup your sources list has already been described by garbagecollector (also note the additional directory as explained by Javier Rivera).

To backup the trusted keys added to your system you can use the apt-key command line program. I don't know if there is a way to do this from the GUI.

From a terminal you can run something like this:

sudo apt-key exportall > ~/repositories.key

Then on your other system you should be able to import that key file from Software Sources or you can use apt-key again:

sudo apt-key add /path/to/repositories.key

I only have one Ubuntu desktop system so I haven't tested this out, but I think it should work.