I have to reinstall my system (Debian Linux), and need to install the same packages I previously installed with Synaptic.
Synaptic has menu options to save and reload a file which contains a list of the installed packages.
Since I cannot use the GUI (I am dealing with a broken system), how can I perform these operations from the command line?
I did not save such a list in the past, so I would need to do it now. Is it possible to do it with Synaptic from the command line? Can I use
apt? Is there a file with the list of installed packages, even if I did not ask to create one?