How to completely wipe computer including OS

3

1

Is there a way to completely nuke everything on a computer, including all OSs? I've been trying to fix a computer but I think at this point its time to cut my losses and reinstall.

John Doe

Posted 2016-07-14T22:04:52.913

Reputation: 49

1You could boot up with a linux disk, get access to the command line and type dd if=/dev/zero of=/dev/sdX (where X is the drive you want to get rid of - so probably /dev/sda) - This will take a while as it will zero out the entire disk - you can do it much quicker using dd if=/dev/zero of=/dev/sdX bs=1024 count=1024 - which will zero out the first meg of the disk - including all references to the file structure and it will appear blank to a new OS install. – davidgo – 2016-07-14T22:08:38.713

1Note that if you do perform a quick wipe by only destroying the filesystem metadata, all your data will still be there, and accessible to file-carving utilities like PhotoRec, Recuva, etc. The names and directory hierarchy will be lost, but the file data itself can still be retrieved. for well structured binary files, automated scanners can easily isolate files like images, non-text documents (MS office/libreOffice) PE executables/libraries, databases, etc. – Frank Thomas – 2016-07-14T22:16:17.643

1Boot up from a system disk—like a USB flash drive or a CD/DVD disc—and then wipe the disk that way. – JakeGould – 2016-07-15T04:58:33.813

2

For secure wiping, see How can I reliably erase all information on a hard drive?. In this case, there does not seem to be a security concern. Then formatting the partition is enough; most operating systems will offer to format during installation, or do it automatically, so nothing special to do.

– sleske – 2016-07-15T08:05:39.333

As well as the disks, consider whether you want to reset the machine's saved BIOS configuration back to factory defaults. It's not a given that you should do that, but do give it some thought. – Toby Speight – 2016-07-15T08:39:32.823

Throw it into a river, then throw the river into the sun. – Lightness Races with Monica – 2016-07-15T10:47:20.737

Please explain why you want to "completely nuke" the computer - are you starting over with a different system and want to throw that one out after secure erase, or do you want to reset this system to factory defaults? Why does a normal disk format and OS reinstall not suffice? – Alexander – 2016-07-15T11:25:58.350

Alexander, my previous install of Ubuntu was completely corrupted and not working, and after 2 days of attempting to fix it i decided to clear the device and just reinstall from there. I didn't wipe the old install with the new install because it threw errors while doing so. – John Doe – 2016-07-15T19:33:33.657

Answers

7

short answer, use DBAN (aka Darik's Boot and Nuke): http://www.dban.org/

DBAN is a live CD with all the tools set up for securely wiping media. In general you boot from the LiveCD, use menus to select the disk, and perform the wipe.

Here is a tutorial: http://pcsupport.about.com/od/data-destruction/ss/dban-tutorial.htm

Frank Thomas

Posted 2016-07-14T22:04:52.913

Reputation: 29 039

8Note that DBAN is not suitable for SSDs (it will delete them, but not quite securely, and will shorten their lifespan). Use "ATA Secure Delete" instead. – sleske – 2016-07-15T08:02:40.970

13

Instead of downloading DBAN, you can do the same with any Windows Install disk. In fact I do it regularly with a Windows 7/8/8.1 ISO whichever I have.

  1. Boot up into the Windows Installer.
  2. On the partitioning screen, press SHIFT + F10 to bring up a command prompt.
  3. Type diskpart to start the application.
  4. Type list disk to bring up the connected disks.
  5. The Hard Drive is often disk 0. Type select disk 0.
  6. Type clean to wipe out the entire drive. Alternatively, type clean all and instead of just deleting, it will fill the drive with zeroes hence shredding the drive.

DBAN is the standard in data shredding, however, most people consider it an overkill. One pass of random data is often enough to make the data unreadable for anyone. Unless you have really confidential data and are afraid someone can sniff it, just use the diskpart's clean command.

U. Muneeb

Posted 2016-07-14T22:04:52.913

Reputation: 688

1... and if you have really confidential data, you have it under whole drive encryption anyway, of course. Right? :D – Luaan – 2016-07-15T08:30:50.217

How about doing multiple clean all if you have confidential data? – Krishnabhadra – 2016-07-15T08:48:12.870

1@Russian Soyuz Rocket: Actually, Diskpart's clean all command writes all zeroes to the drive, not random data. – Nassbirne – 2016-07-15T09:46:30.237

@Krishnabhadra, that option would have worked but as Nassbirne stated, it writes zeros to the drive. I don't know the underlying magnetic theory of hard drives and can't say if writing the "same" data again and again would really suppress the older data enough to make it unreadable. – U. Muneeb – 2016-07-15T09:52:12.773

While I do appreciate the solution, I'm going to run Ubuntu not Windows, and attempting to do the same with the Ubuntu install threw errors. – John Doe – 2016-07-15T19:34:45.703

I'm guessing you used dd. You should create a new question for that, or search for solutions on that since they must already exist. You can always wipe a disk using Windows diskpart utility. I find that much more efficient and straightforward as compared to Linux equivalents. You can install Ubuntu later if you want. – U. Muneeb – 2016-07-16T04:07:28.473

6

If all you want to do is reinstall, then there's no need to erase entire drive (as proposed by Frank Thomas and U. Muneeb). You just want to ensure that there's nothing that can obviously be read on the OS partition.

If you want to erase OS partition, but preserve other partitions, just start re-installing Windows from optical disc or flash drive. On the partition selection screen there will be a Format button. Select the partition you want to install to, format it and proceed with installation. Other partitions will be preserved (including recovery partition, if you have one). This is what you usually want to do when reinstalling Windows.

gronostaj

Posted 2016-07-14T22:04:52.913

Reputation: 33 047

Yes, this. OP does not need/want a secure wipe, they just want the old OS out of the way. For that, reformatting the partition is enough. – sleske – 2016-07-15T08:04:52.813

Well, the OP noted "including all OSs", suggesting they need to nuke more than one OS/partition. Unless they have 10 different installations of Windows on the same partition, of course... – Luaan – 2016-07-15T08:32:16.217

1If it's Linux you're installing rather than Windows, then most distros have the ability to partition and format drives before starting to write anything to disk. E.g. in the standard Debian or Ubuntu installer, it's in the install menu shortly after selecting your preferred language and keyboard layout. – Toby Speight – 2016-07-15T08:36:55.713

1Sometimes a corrupt partition table can mess things up. You might want to remove everything, including the partition table as well and start from scratch. – U. Muneeb – 2016-07-15T12:11:56.100

1@RussianSoyuzRocket You're right. However OP doesn't seem to consider any options other than fixing current instance of OS and nuking hard drive. I wanted to show that there are other options and regular reinstallation is next thing to try before deleting innocent files. – gronostaj – 2016-07-15T12:34:54.087

True that. I would agree. Though in the case of unfixable boot errors I would recommend a total nuke. After backup of course :) – U. Muneeb – 2016-07-15T12:56:44.960