I am new to Linux and want to restart Ubuntu. Is there a way that I can erase everything, but still keep ubuntu? Somewhat like a factory reset.
3 Answers
Somewhat like a factory reset.
Did you get Ubuntu with the system? I doubt it so a factory reset will not be there unless you make a backup of your system yourself. You could make one by creating a partition of about 1Gb and putting your current system in there. You need to create an installer from an ISO by adding in all the software you need and then have "grub" boot from it. Pretty difficult to do though :)
It is far easier to do a full re-install. When you have an SSD as boot disk probably takes a 20 minutes (without the post install script).
===
I would do the following (and have been for several years now):
1 time preparation:
- create a partition where you store all your personal data.
- Move all normal directories from /home/$USER/ to that partition and edit
~./config/users-dirs.dirs
to point to it. Save a copy of that file on your partition. - on the same partition create a file with all the "apt-get" instructions you do post-install. If you remove or add software from the base install toss all those commands in that script.
Now a re-install is done by ...
- formatting / and mounting it
- if you use a /home/ partition formatting /home/ and mounting it
- mount the data partition
- after the install finishes you copy users-dirs.dirs over the original and press f5 on the desktop.
- re-install the software you use from the post-install script you made.

- 299,756
-
Thank you this worked well. Sorry if this was a stupid question and also I said factory reset as a way to help you understand what I wanted to do not that I thought there was one for it, but thanks anyway. – user3667076 Nov 28 '15 at 03:31
Simple. Just do a 100% reinstall from the DVD. You can download the images from http://www.ubuntu.com/download and select the appropriate image for your system. You will need to select the "Erase Ubuntu and install" option in the installer.

- 3,446