How to reinstall Ubuntu over existing installation while preserving /home
Starting in Ubuntu 8.04, ubiquity (the ubuntu system installer) allows the user to install Ubuntu while preserving the /home directory. This allows you to reset your computer to default but to keep your personal files and configuration files. The point of ubiquity-preserve-home is that it’s supposed to work smoothly behind the scenes using Ubuntu’s Installer.
If you choose not to format the partition assigned to “/”, then everything on that partition that would cause problems for an Ubuntu installation will be removed (e.g. the contents of /boot, /etc, /lib, /usr, etc.), but /home and other unknown directories that might contain data will be preserved. Doing this does not require an explicit action by the user, other than choosing manual partitioning and *not* formatting the partition assigned to “/”. This may be used as a last resort to restore Ubuntu to default at the point of installation but will preserve the /home directory.