I want to reinstall my linux system (specifically linux mint). I have kept important data elsewhere, so I can safely remove everything.
However, I want to do the following:
- save the list of packages I have installed so far
- after reinstall take the backup list and use it to install packages
Are there tools that can assist in doing this. I know I can use dpkg -l
to get list but perhaps I only want the leafs – packages that no other depend on.
Best Answer
The problem with using
dpkg --get-selections
is that it does not preserve some package states such as "automatically installed". To preserve all data, you can use the aptitude front-end to backup and restore the package list: