Package installation after re/new install (Ubuntu)
Posted by stringofthoughts on April 29, 2009
Re installation is a headache but what’s more painful is the package installation all over again. You had a lot of softwares installed in your system and now you have to do it all over again. Funny thing is sometimes it’s hard to remember all the softwares. I did this after my every new and re-install and it’s very time consuming and more frustrating. But, with Linux you learn new things everyday, which is why Linux is so much fun to use. I recently learned that I could avoid all this by a few simple commands :).
$ sudo dpkg –get-selections > myPackages
This will make a list of all the installed package in your system and store it in a file. Nice 🙂 now we ‘ve a complete list of packages that we’d need after say re-install.
Re-install the system and use this command to get everything back the way it was without wasting any time and getting frustrated. (Make sure you keep myPackages in some other drive before re-installation :P)
$ sudo dpkg –set-selections < myPackages && sudo apt-get dselect-upgrade
This takes the packages from list and installs just like it was before re-install.
See how easy things are in Linux when you know exactly how to use it.