Clone Ubuntu, Linux Mint or other Debian Based System

Cloning the installed packages from one Operating System to another can be done easily. This trick works when exporting to or importing from the same distribution and same release. Example, from Ubuntu 12.04 to Ubuntu 12.04, Linux Mint 13 to Linux Mint 13, etc.

I usually create a customized package list, to install them if I reinstall my system, like this.

So, to clone the installed packages on a new system, you have to create a package list, and export it and the /etc/apt/sources.list file, on the new system:

Do this on the primary OS:

Create package list:
$ sudo dpkg --get-selections | cut -f 1 > package_list

Copy the package_list file and overwrite /etc/apt/sources.list on the clone system:

On the target OS:

Now, with the repo list overwritten, the last thing you have to do is to install packages from the list. Like this:

$ cat package_list | xargs sudo apt-get -y install

Tagged with: , , , , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!