Using dpkg for new install

After every new OS install, you usually will need to download all the necessary packages that were in the previous installation to maintain the continuity of your old system build. This is definitely time consuming and also trying to remember all of the packages used on the previous system can be difficult, to say the least. But by using dpkg we can do it in a few commands.

Before doing a fresh install, run this command to save a list of all package selections. This is a list of the packages that you had in your previous system.

sudo dpkg --get-selections > packages.list

Now, in the freshly installed system run this command to replicate all the packages that you had in your previous installation.

sudo dpkg --set-selections < packages.list && sudo apt-get dselect-upgrade

g33kadmin

I am a g33k, Linux blogger, developer, student and Tech Writer for Liquidweb.com/kb. My passion for all things tech drives my hunt for all the coolz. I often need a vacation after I get back from vacation....

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.