Generate list of installed applications. It is useful when we want to have the ability to restore a system or clone to another machine.

dpkg --get-selections > fichero

This sends the packet to the file list fichero .

To be useful we can restore the packages and we'll do the next command.

sudo dpkg --set-selections < fichero

Where fichero is the list of all the packages to install.