A fresh install and clean up?

There are 4 things you generally want to preserve when you do a re-install.

  1. Your home directory - as mentioned, you have home on a separate partition.
  2. Any customisations you've made in /etc. If you've made any, you probably did them by hand and therefore have some idea of what they are.
  3. Your list of installed programs. Executing dpkg --get-selections | grep install > installed.txt will create a list of packages that are currently installed. In your case this doesn't sound like something you want to preserve, so you could skip this step.
  4. Your /var directory. Some programs store important data here, so it's worth backing up. Things I've seen stored in /var include mail directories, databases, game save files, and web configuration files. Having a backup means you can selectively restore anything that turns out to be needed.

So, a plan would probably look something like this:

  1. Back up any customisations in /etc.
  2. Back up your /var directory.
  3. Either run dpkg --get-selections | grep install > installed.txt or run an eye over the Applications menu for the names of any applications you use regularly.
  4. Re-install your system.
  5. Install any missing applications. If you want to use the generated list, you can do:

    sudo dpkg --set-selection < installed.txt
    sudo apt-get install --yes dselect
    
  6. Re-apply your customisations in /etc (if still needed).

  7. Upgrade your home partition to ext4 (optional, see the Ubuntu wiki for details).
  8. Restore anything that turns out to be needed from /var.

I would recommend against wiping out the configuration files in your home directory; you'll lose things like your browser bookmarks and security keys, for example. A better strategy for getting back to default settings would be to create a new user account and compare their settings to the ones your normal account is using.


This all depends on personal preferences. But if this was my system, I would do a clean install - including reformatting /home.

The reason I would do this is because the 7.xx series used the ext3 filesystem, while the new 10.04 uses ext4. You can convert from ext3 to ext4, but it is much easier to reformat since I would be reinstalling anyways.

You will have to back up /home to a separate drive. I would backup just the files I need, and leave out the config files (hidden files like .gnome2, .gconf, etc.). After I reinstall, just copy the files back into place.

This may or may not be the best way to do. It depends on your preferences and objectives.


When I want to start over Ubuntu I usually follow this steps:

  • Boot from LiveCD.
  • Mount my home partition
  • Rename my home dir to something like javier-old.
  • Install, keeping my home partition, the install will create a new home for the default user (javier in this example)
  • After installing I move all my normal files from javier-old to javier.
  • Then I locate the config files from the programs that I want to keep settings and move then from javier-old to the new home (usually .thunderbird, .gnome2/gedit, .ssh, .Private, etc...)
  • Firefox gets special treatment. I left over the extensions folder and just copy the other files. Sometimes a do a more granularly copy of firefox files. Usually I just want the bookmarks and the passwords.

And that is all. That way not only I start with a clean system, I reset most apps to their default, but the ones that I really want.

Finally I keep the javier-old dir there just in case I want to recover some data or some configuration later.