Re-install Ubuntu without losing data in home folder

Recently I installed Ubuntu 12.10 x64 Server Edition on my PC. Unfortunately, I attempted to install a lightweight desktop but due to the fact that I have an old graphics card, the PC does not perform so well. I am thinking of re-installing an Ubuntu version but I do not want to lose the contents in my home folder. Is there any way to do that with a Live CD?


Ever since Hardy (Ubuntu 8.04) you can reinstall Ubuntu without losing data in /home even without a separate /home partition.

See

https://help.ubuntu.com/community/HomeFolder

https://help.ubuntu.com/community/UbuntuReinstallation

Preserving home when reinstalling Ubuntu

Since Hardy, Ubuntu can be reinstalled while preserving home even without separate /home: see UbuntuReinstallation.

Few people know it, but since Hardy it's possible to reinstall Ubuntu without losing the content of the /home folder (which contains program settings, internet bookmarks, emails... and all the documents, music, videos that you have put in it). Even if /home is not on a separate partition

Of course, you should always have a backup of your data.


If you have a dedicated partition for /home:

  • launch the installer
  • when it comes to the choice of disk and partitions, choose "other" and then, manually select the partition for / and /home; check that the installer will format only the / partition, and not the /home

If you have only one partition:

  • launch the live cd, select "try Ubuntu"; if you have an old pc, you may try xubuntu instead of ubuntu
  • once on the desktop, use the file manager to browse your home directory, display hidden files, select all and copy all on a usb key
  • when the installation is finished, you can copy again the files in your /home before restarting

Why reinstall? Just install the (meta)-package that installs the graphical Desk Top Environment (DTE) of your choosing. If you want to reinstall, at least create a separate /home partition. If you really want flexibility use Logic Volume Manager (LVM) so you can easily add, remove and resize partitions (aka "logical volumes" in LVM language). You can also add or remove disks to your logical disk (volume group) without reboot the machine.

But please consider to just install the right DTE first, as you really don't need to reinstall your machine to get a graphical environment. Or even uninstall the DTE you installed, if your don't want it in your machine.