How to wipe Ubuntu clean?

7,069

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:

  1. create a partition where you store all your personal data.
  2. 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.
  3. 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 ...

  1. formatting / and mounting it
  2. if you use a /home/ partition formatting /home/ and mounting it
  3. mount the data partition
  4. after the install finishes you copy users-dirs.dirs over the original and press f5 on the desktop.
  5. re-install the software you use from the post-install script you made.
Share:
7,069

Related videos on Youtube

user3667076
Author by

user3667076

Updated on September 18, 2022

Comments

  • user3667076
    user3667076 almost 2 years

    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.

  • Bilal
    Bilal over 8 years
    as @Daniel Said, Just reinstall it
  • user3667076
    user3667076 over 8 years
    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.