In order to reinstall or restore your installed software you need to have a list of all installed software.
Task: Backup list of installed software
Debian Linux
If you are using Debian Linux use dpkg command to list installed software:
Code: Select all
$ dpkg --get-selections
Code: Select all
$ dpkg --get-selections > /backup/installed-software.log
Use rpm command to get list of all installed software:
Code: Select all
$ rpm -qa
Code: Select all
$ rpm -qa > /backup/installed-software.log
Now you have a list of installed software. After installing base system you can immediately install all software.
Debian Linux
Debian Linux makes your life easy. All you have to do is type following two commands:
Code: Select all
# dpkg --set-selections < /backup/installed-software.log
Code: Select all
# dselect
RPM based distro
As far as I know RPM based distro does not offers dpkg kind of facility. But with little shell scripting technique you can easily install all software:
Code: Select all
# LIST="$( cat /backup/installed-software.log )"
Code: Select all
# for s in $LIST; do yum install $s; done
Code: Select all
# yum -y install $(cat /backup/installed-software.log)
Code: Select all
# for s in $LIST; do up2date -i $s; done
Code: Select all
# up2date -i $(cat /backup/installed-software.log)