Created
November 13, 2012 21:12
-
-
Save marcialca/4068430 to your computer and use it in GitHub Desktop.
Ubuntu reinstall process
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ##Ubuntu Reinstall progres | |
| 1. Install / and /home apart, so it's easier to make a reinstall | |
| 2. Backup all packages! | |
| 2.1. Create a REINSTALL directory in your Home. The type in Terminal in the directory: | |
| sudo apt-get update | |
| dpkg --get-selections > /REINSTALL/installed-programs.log | |
| 2.2. Save you GPG keys | |
| sudo apt-key exportall > ~/REINSTALL/repositories.key | |
| 2.3 Save your Sources List. Type in Terminal | |
| sudo nautilus | |
| In the open window move "/etc/apt/sources.list" and "/etc/apt/sources.list.d/" to the /REINSTALL/ folder | |
| 2.4 Save your APT packages. Type in Terminal | |
| sudo nautilus | |
| In the open window move "/var/cache/apt" to the /REINSTALL/ folder. Omit the .lock file | |
| 3. Get it back | |
| 3.1. In Terminal type: | |
| sudo nautilus | |
| Move your sources and apt cache folders and files back to their place | |
| 3.2. Get you GPG keys back type in terminal | |
| sudo apt-key add ~/REINSTALL/repositories.key&&sudo apt-get update | |
| 3.3. Open Terminal once reinstalled and type | |
| cd REINSTALL | |
| sudo dpkg --set-selections < installed-programs.log | |
| sudo apt-get dselect-upgrade | |
| Or: | |
| Eliminate the "install" word from installed-programs.log | |
| then type in the Terminal (on the installed-programs directory): | |
| cat installed-programs.log | xargs sudo apt-get install -y | |
| aaaand You're back! | |
| Tested on Ubuntu 12.10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment