Linux: How to Easily Reinstall Packages

in

Here's a quick tip I learnt last week from the Lotta Linux Links podcast (Episode 20). This will work on all Debian based distributions. First of all produce a list of all the installed packages on the system by typing:

#dpkg --get-selections > /home/username/installed-software.log

This will redirect a list of all the packages into the file "installed-software.log". Then all you have to do in order to reinstall all the packages is type:

#dpkg --set-selections < /home/username/installed-software.log

Now that I have my /home on a separate partition and I back this up onto an external ubs hard drive and an internel ide hard drive, if I ever have to re-install my system I can just make a base install and then reinstall the list of packages. Simple!