Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Upgrade while keeping home partition


  • New PC with fresh Ubuntu installation (10) + Old PC with Ubuntu (8)
  • Want to copy the old users' setting+files onto the new PC
  • Would like to keep as much program settings as possible (Thunderbird, Firefox, F-Spot, Gimp, Desktop links, ...)

What are the necessary steps for this?

  • Will I have to create the users prior to copying the /home directory?
  • Should I copy the whole /home directory or only the directories of specific users?
share|improve this question

marked as duplicate by Marco Ceppi Jun 21 '11 at 15:51

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

This is a duplicate because all files and settings for all users are stored in /home. See for seperating /home into a new partition. – dv3500ea Oct 28 '10 at 12:53
It may be related - but not a duplicate, as moving home is not the same as copying home to a system where the users possibly do not exist. - or is it? – Martin Oct 28 '10 at 13:34


tar cvpzf backup.tgz $HOME


To test if your backup file has no errors try this command:

tar tvzf /home/Backup.tgz


sudo tar xvzf /home/Backup.tgz -C /

You can do it the same with your package installed with this :

Here’s a simple tutorial on how to backup a list of all your installed repository applications, and restore them to another machine, perhaps even the same machine after a clean installation. This can save you an incredible amount of time, especially when this task must be repeated often. 

First, from a computer with all the applications preinstalled, retrieve your installed package list and redirect the output to a file called packages.txt.  Save this package list somewhere so that you can use it for the restore process.

sudo dpkg --get-selections > packages.txt

To restore all the applications from your list, you must follow a three step process very carefully.

sudo dpkg --clear-selections

sudo dpkg --set-selections < packages.txt

sudo aptitude install

You will be prompted to install all the new applications in the list. Another example of what this process allows you to do is create a baseline of all the applications after a clean installation of Ubuntu.  Let’s say you would like to remove any applications installed since the clean install, perform the exact same process, and any package not defined in that list will be removed.

sudo dpkg --get-selections > clean-install-package-list.txt

sudo dpkg --clear-selections

sudo dpkg --set-selections < clean-install-package-list.txt

sudo aptitude install

The very first command of “–clear-selections” marks all currently installed packages to the state “deinstall”.  When you restore the list of applications using “–set-selections”, only packages ommited from the list will remain in the “deinstall” state.  Aptitude will honor the deinstall state and remove the extra packages, leaving you only with packages from the list.

share|improve this answer

All the user-depended settings and configuration are inside the user's home directory (often in hidden files or directories, i.e. that start with .).

It should be sufficient to restore the complete user directories (and make sure the ownership relates top the new user account on the new system, i.e. make sure the user ids are the same).

share|improve this answer

Use Ubuntu Tweak's back up option. You can back up anything from simple apps to your whole /home folder or system settings.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.