Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save itsjef/5e2b8e42b5d35c092bbd to your computer and use it in GitHub Desktop.
Save itsjef/5e2b8e42b5d35c092bbd to your computer and use it in GitHub Desktop.
Short guide on how to move your Linux distro from a computer to another

##Step 1 - Backup your /home folder

  1. Install Backups tool by typing in the Terminal: sudo apt-get install deja-dup
  2. Backup your /home folder. Default backup is stored in ~/deja-dup folder

##Step 2 - Backup your package list

  1. Backup package list: sudo dpkg --get-selections > PackageList.txt
  2. Backup APT-key: sudo apt-key exportall > RepoKeys.txt
  3. Backup Source folder: sudo cp /etc/apt/sources.list.d source.list.d
  4. Copy all those files to an USB

##Step 3 - Fresh install on the new machine

  1. This distro must be the same distro with the one on your old machine
  2. username on the new machine must be the same, too

##Step 4 - Restore 2. Install Backups tool as above and restore your /home folder 3. Install dselect: sudo apt-get install dselect 4. Navigate to the backup folder on your USB and type these lines into your Terminal
sudo apt-key add RepoKeys.txt
sudo cp -Rf source.list.d /etc/apt/source.list.d
sudo apt-get update
sudo dselect update
sudo dpkg --set-selections < PackageList.txt
sudo apt-get -u dselect-upgrade
5. This restores 99% things to your new computer. A few programs require additional downloading and installation such as Dropbox, Steam, Wine ...

Hope this helps! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment