Ubuntu Linux Hack – How to Install Fresh Copy of Ubuntu without Losing your Current Program Settings!

If you are a hard-core Ubuntu/Linux supporter like me, you will need to learn how to save your programs when you install a fresh copy of Ubuntu.

Here’s how to do it:


Keeping your configuration intact is pretty straight forward and obvious. Just backup your /home folder onto an external drive or whatever. Make sure you also grab the hidden files, don’t do my mistake!

Now for the current applications. Basically we just need to make a full list of the installed apps.
sudo dpkg –get-selections > /home/user/package.selections

Of course don’t forget to backup package.selections on the external hard-drive. Also you should backup your /etc/apt/sources.list file since you probably have some extra sources listed over there. Now you can go about your business and do a fresh install.

Once your done with the fresh install, copy the file package.selections into your home. Then copy your sources.list file into /etc/apt/ and update it to match your current distro (e.g Gutsy –> Intrepid) you can use CTRL + H in gedit for that. Then do a “sudo apt-get update” ,and finally invoke:
sudo dpkg –set-selections /home/package.selections && apt-get dselect-upgrade

apt-get will now start downloading all your apps, this will take some time depending on the number of apps you have installed.

Once that’s done, just copy your backup-ed /home over the current /home (again don’t forget hidden folders).

Log out and log back in to your shiny new fresh install!


One Response to Ubuntu Linux Hack – How to Install Fresh Copy of Ubuntu without Losing your Current Program Settings!

  1. Jeff says:

    It’s a helluva lot quicker just to make a separate /home PARTITION and then simply install the next version of Ubuntu over your root filesystem. As long as you don’t tell the installer to format /home, it will be preserved as will all your settings, leaving only to reinstall any extra apps as you’ve already described.

    Alternatively, just update your current version to the next one rather than do a complete reinstall.

Leave a Reply

Your email address will not be published.

Check out more interesting categories: Computer, Consumer, DIY, Educational, Featured Hacks, Hack, HOWTO, Linux, Misc, Projects, Ubuntu.

Related News and Resources