27

Is there a way, that I could backup all my programs, all apps, put them in a directory or something, so that I could install them quickly next time, without having to manually going over the app center, downloading them from terminal, etc?

Note that I might import them from a distro other than the one I exported them on. So, say I'm in Ubuntu, exported some stuff, and then installed BT and wanted to import them from there.

Jorge Castro
  • 73,717
VeXe
  • 423

5 Answers5

39

When I have to format my Ubuntu I follow this steps:

  1. dpkg --get-selections > package_list This creates a text file (package_list) with all package installed in your system. You can edit the file if you want to delete some packages.
  2. Backup /etc/apt/sources.list file and /etc/apt/sources.list.d/ folder. Here there are all the repositories.
  3. Backup /home/MyUser folder. All application settings are hide folders/files in your user's home folder, maybe you want to select what settings you want to restore.
  4. Format and install new Ubuntu.
  5. Restore your repositories (/etc/apt/sources.list file and /etc/apt/sources.list.d/ folder).
  6. sudo apt-get update && sudo apt-get upgrade
  7. sudo dpkg --clear-selections and sudo dpkg --set-selections < package_list. To restore the information of your installed packages.
  8. Install them: sudo apt-get update && sudo apt-get dselect-upgrade
  9. Finally, sudo apt-get autoremove to clean some packages.

Well, there are 9 steps, but you have an easy Ubuntu clean install.

Another solution is to mantain a list with your installed applications, then sudo apt-get install app-name (you can create a bash script).

ilazgo
  • 516
1

@ilazgo's answer right on point!!Thank you. I used a slightly different format due to the problem I had at hand. Mine involved moving an encrypted home folder from a disk image I had initially created to the current home folder. Using @ilazgo's solution in addition to rsync options source destination, I was able to merge the two. Another solution can be found Here

0

If you in apt environment:

  • sudo apt install apt-clone
  • Backup your packages sudo apt-clone clone ~/my-backup-packages
  • sudo apt-clone restore-new-distro my-backup-packages.tar.gz for restore a clone file from to and try upgrading along the way. this can be used so that the current release is cloned, a new install is done and then the old clone is installed.

Carefully: restore overwrite sources.list see how-to-backup-settings-and-list-of-installed-packages for solution.

As wrote @raphael it is duplicate how-to-backup-settings-and-list-of-installed-packages

C2RLOS
  • 57
0

For versions up to 15.04, Aptik is a nice GUI method of backing up to a remote drive and restoring everything with a few clicks of the mouse.

It's available in the PPAs.

0

Aptik is something you could look into

http://www.unixmen.com/aptik-backup-ppas-themes-icons-application-settings-ubuntu/