1. APT Packages list
dpkg --get-selections > package_list
This creates a text file (package_list) with all package installed in your system. You can edit the file if you want to delete some packages.
TIP: for Offline installations you can use APTonCD to back up the actual packages. (they can be outdated and won’t auto-update!)
3. Personal Data
Backup your home folder
Notice: All application settings are hidden folders/files in your user’s home folder, maybe you want to select what settings you want to restore.
1. Install your Debian OS
2. Restore repositories (/etc/apt/sources.list file and /etc/apt/sources.list.d/ folder).
3. Import your package list
apt-get update && sudo apt-get upgrade
dpkg –set-selections < package_list
4. Install your selected packages
sudo apt-get update && sudo apt-get dselect-upgrade sudo apt-get autoremove