Copy all installed programs

Quite often, you may need to reinstall/upgrade Ubuntu/Linux Mint and it means installing all the programs you need. Thus we waste a large amount of time just installing programs. However, there is a simple solution that will allow you to clone all the programs installed in your computer so that you will have an exact copy of programs installed before.

For this, open terminal and run the following command:

sudo dpkg -l | awk '/^ii/ { print $2 }' >package-list

this will make a list of all programs you have installed in a package-list file.

Next, open the computer you wish to install the packages to, and type:

sudo xargs apt-get install -y < package-list

Thus you can clone all the programs you have with just a single command.

Note: this works in all the distros that have apt package manager. The target and parent computers must use the same operating system/sources.