If you want to clone another machine in a similar way as one of your other machine, you can make use of dpkg command.
What does cloning mean?
Cloning a machine means installing the same packages (sometimes even settings) as found in the source machine. dpkg allows you to get the current state of your machine – the set of packages installed in the machine and their state (whether installed or uninstalled)
Suppose you have the list packages_list containing the state of the source machine.
Now go to the destination machine and run the following command
dpkg can be used for a variety of purposes. It can be used to install and remove packages. But one of the best feature which you can use is to save the current state of your machine.
What is current state of your machine?
You may be wondering what does the current state means. Your ubuntu/debian machine is a collection of many packages. Every time your machine crashes, apart from losing the valuable data, you may also lose the information about various packages you installed in your machine.
dpkg –get-selections gives the list of all package names and their current state like installed, deinstalled etc.