Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
1  
@Martin Betz: I disagree that that question is a duplicate. The OP clearly wants a comprehensive back-up of all installed applications, including ones that weren't installed through apt-get or dpkg. –  Flimm Jan 15 '13 at 13:08
add comment

1 Answer

up vote 6 down vote accepted

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).

share|improve this answer
    
@lago Is it possible to avoid default installed applications. As an example firefox is default installed, and vlc is not. So next when i will install system only install vlc. –  shantanu Oct 31 '13 at 12:26
    
@shantanu for do that you have to build your own Ubuntu image. There are some software that helps you. Search in Google or ask another question :) –  ilaz Oct 31 '13 at 13:09
    
@lago sorry for my bad explanation. Actually i mean that, A fresh installed ubuntu has firefox installed. Now i install vlc. Lets get package list. There should be two package, firefox and vlc. Now i want to install fresh ubuntu again. Want to restore my packages. dpkg --set-selection < package_list. dpkg will run for firefox and vlc. But i don't need firefox, only vlc which is not installed by default (in fresh ubuntu). –  shantanu Oct 31 '13 at 21:22
    
@shantanu well, for that, you have to get an empty Ubuntu image (and then install all what you want), or you have to do a sudo apt-get remove --purge firefox for every package you want to unninstall. Yo can do that in a bash script. –  ilaz Nov 4 '13 at 7:25
1  
For future reader: I took a leap of faith and did the reinstallation yesterday. The part where I "export" then "import" list of installed software went without hitch. The "back up home folder" part went nicely because I configured my laptop exactly like before. Some people reported that back in time snapshot may not recognize old snapshots if the account / permission configuration is not exactly the same. –  Anh Nov 18 '13 at 21:02
show 2 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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