Reinstall all your packages after fresh install of Ubuntu

Sometimes you want to reinstall Ubuntu from scratch (i.e. instead of upgrading), but of course also reinstall all the packages that you had before. Beforereinstalling, dump your installed software with

dpkg --get-selections > installed-packages

and of course make sure you keep this file somewhere where it doesn’t get deleted during the install process. Then, after installing Ubuntu, reinstall all your packages with

# install dpkg which is not installed by default
sudo apt-get install dpkg

sudo dpkg --set-selections < installed-packages
sudo apt-get dselect-upgrade

Wait everything to install. Done.



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: