The easiest way is to have your /home directory mounted on a separate
partition. That way when you reinstall, only "/" and files contained
there are changed.
Here is the guide to backing up and moving home to its own partition
from the ubuntu site:
https://help.ubuntu.com/community/Partitioning/Home/Moving