0

I need to reinstall Ubuntu but keep ./Downloads, ./Documents folders of previous installation.

Everything else needs to be in pristine condition like first time installation

that means no .gitconfig, .gitignore, .gemrc, .npmrc, .bashrc, .bash_profile, and other settings file and previous installed apps, files or folders except ./Downloads and .Documents.

Removing these files manually looks a bit tedious, Is there any better way?

I tried the solutions provided here and here but that solution keeps the home folder intact, thus keeping many unnecessary files/folders from previous installation.

My disk structure is: enter image description here

  • 1
    Is separating /home from all your data a possibility? My normal install keeps /home inside / (root), but all data in /mnt/data partition. I backup /home incase I need to fully restore, but can have a new clean install and link same data into that install. http://ubuntuforums.org/showthread.php?t=2315714 & http://ubuntuforums.org/showthread.php?t=1811198 – oldfred Mar 03 '17 at 17:57

1 Answers1

0

You can reinstall Ubuntu and keep your existing /home directory, by booting a Ubuntu 16.04.1 Live DVD, and choosing Something Else, choosing your existing Ubuntu partition to reinstall into, and unselecting format partition.

Also you can install SystemBack and backup all your ubuntu system or part of it. You choose what you want.

You save it as a .iso file and install it like usually (usb or cd).

Here you could choose what to install on your ubuntu iso. You can add all your applications, session, configurations or just choose your personal data (photos, files,etc).

In terminal:

sudo apt-add-repository --yes ppa:nemh/systemback    
sudo apt-get update    
sudo apt-get install systemback
George Udosen
  • 36,677
  • This is a good way, but unfortunately I cannot use this, as my hdd does not have enough space to create a backup file. I need atleast 700gb free space for that, but i only have 250. – Sirajus Salekin Mar 04 '17 at 10:33