Command to write a file of all your installed packages
From SHellium Wiki
$ dpkg --get-selections > installed-software; echo $?
Here we use the dpkg command to get the installed packages. Then use the stdout to make a new file with the >. Finally we complete the command with ; and then place the exit status $0. So if the installed packages and are written to the installed-software then we will get a zero.
$ less installed-software
We know can view the files, using a less the installed packages.