How to Wipe Your Hard Disk Drive Leaving the OS Intact

Ads by Google

how to wipe hard driveSo you want to get rid of your computer. To keep your data secure — whether it’s financial records, business information, or anything else private that you don’t want people snooping through — you’ll want to securely wipe the hard drive. This ensures that no one can recover the deleted files. However, you don’t want to wipe the operating system itself — you want to provide a fresh operating system so the computer’s new owner can use it.

Just re-installing your operating system or restoring from your recovery partition isn’t enough to guarantee that your files won’t be recoverable. When getting rid of a PC that has potentially sensitive data, you should wipe the drive to be sure your data can’t be recovered.

Why Securely Wipe

Sure, you could just delete your personal files, or even re-install Windows or use the Reset Your PC feature built into Windows 8. However, this could leave some of your personal data behind.

When you delete a file, it isn’t removed from the hard drive immediately. Instead, the computer marks the area as usable and it can be overwritten in the future. This means that your personal files may remain accessible, even after deleting them. If you’re getting rid of your PC and don’t want people accessing sensitive data — for example, tax documents with your social-security number and other personal data — you’ll want to securely wipe its storage before getting rid of it.

Ads by Google

The process of “wiping” just refers to overwriting all the sectors on your hard drive, replacing their contents with zeroes or random nonsense. This will overwrite any data that’s been marked as deleted, but which can be recovered.

If you don’t do a secure wipe, it’s possible that people could use a file recovery like Recuva to recover sensitive files from your hard drive.

Solid-State Drives vs. Magnetic Drives

The below advice doesn’t apply to solid-state drives, provided TRIM is enabled. When you delete a file on a solid-state drive, it is deleted immediately. If your computer has a solid-state drive, all you need to do is make sure TRIM is enabled and delete your personal files — or better yet, use the Reset Your PC built into Windows 8, re-install Windows, or restore your computer’s operating system from its recovery partition.

Using a drive-wiping tool on a solid-state drive is actually a very bad idea, as the additional writes can reduce a drive’s lifespan.

how to wipe hard drive

Ways to Wipe the Hard Drive and Leave the OS

We’re assuming that you want to end up with a PC with an operating system installed, but one where you’ve wiped all your personal data so no deleted files can be recovered. You can do this in several ways:

  • Completely Wipe Your Hard Drive, then Re-install Windows: Use a tool like DBAN (short for Darik’s Boot and Nuke) to wipe your computer’s hard drive, eliminating everything — including its operating system.

how to wipe hard disk

You can then re-install Windows from a Windows disc or re-install your computer’s operating system from a recovery disc the manufacturer provided. Note that DBAN will wipe any recovery partitions on your computer’s hard drive, so you won’t be able to restore Windows from the recovery partition.

how to wipe hard disk

  • Re-install Windows, then Wipe Your Data: First, use the Reset Your PC feature built into Windows 8, restore your PC from its recovery partition or disc, or re-install Windows from a Windows disc. You should then have a clean system without any personal data — be sure to check that all your personal data has been deleted, including data on separate hard drive partitions that may not be wiped by the recovery process.

how to wipe hard disk

Once you have a fresh Windows system, you’ll just need to wipe all the free space. You can use a tool like the Drive Wiper tool built into CCleaner to wipe only your hard drive’s free space, ensuring that no deleted files will be recoverable.

how to wipe hard drive

You could try to delete all your personal files and then use a Drive Wiper tool without re-installing Windows at all, but you’re better off starting with a clean operating system to ensure your data is removed. This also allows the computer’s new owner to start with a fresh operating system.

If You Don’t Care About the OS

If you don’t care about making the computer usable for its new owner, you can always just run a tool like DBAN and leave the computer with an empty hard drive. This will prevent the computer from booting until its new owner installs an operating system.

However, this probably isn’t the best idea unless you plan to trash the computer or its hard drive. Leaving the computer’s operating system intact will make it easier for you to sell it. If you’re giving it away for free, it will result in less work for the computer’s new owner.

Thanks to our readers on MakeUseOf Answers for their interesting discussion that inspired this article!

Do you have any other tips for securely wiping a drive without obliterating its operating system, or do you have any favorite tools to share? Leave a comment below!

Image Credit: Hard disk drive and eraser via ShutterstockSSD Stack Image via Shutterstock

Ads by Google

29 Comments - Write a Comment


Paul Pruitt

Shouldn’t you be recommending the use of SecureErase instead of DBAN? DBAN does not erase from those sectors the drive has previously set aside as damaged but Secure Erase does:

Chris Hoffman

I had no idea, I’ve never heard of SecureErase before — thanks!



this is fantastic for windows.

how can i do the same on my mac ? leave the OS (mountain lion 10.8.4) intact while wiping everything else clean to make it easier for my sale on eBay ?

thanks much,
– j.t. kirk


This erases ALL your Data and the Operating System!!! For OSX just go into Disk Utility once booted to your Recovery HD partition and choose to format the hard drive–>go into options and drag the slider up one or two notches. Single pass 1’s & 0’s is usually sufficient but 7 pass (which will take forever) is government level. Hope that helps


OR…—the Erase Free Space button on the Erase tab in Disk Utility (found in your Applications -> Utilities folder).

When you click this button, you’re presented with three options for securely erasing the free space on your hard drive: write over the free space with zeros (fast and relatively safe), write over the free space seven times (more secure, very slow), or write over the free space 35 times (extremely slow!).

khalid hassan

excuse me ! I have Hp laptop windows 8.1 so i decided to conduct factory reset then I selected 1- remove hard drive and reset the PC to its factory version. I installed my back up CDS to eliminate my previous windows and hard drive i finished the process and my PC has been reset to its factory setting . My question is all my files have been deleted but can any one even forensics people can recover or overwrite my deleted files??.Does my hard disk still store these files?



If you take an image of the drive, will the “deleted” files be in that image, or does it only copy the actual data?
In other words, could you reset the computer to factory settings, take an image of the drive, run DBAN, and then restore that image and achieve the same result as using CCleaner after reinstalling?

android underground

A good drive imaging app will let you choose between a full byte-for-byte backup (useless, unless you’re a forensic cop) and an image that ignores the empty space and only copies sectors if the file system says there’s data in ‘em.

Chris Hoffman

That’s a good answer. A full image of every byte on the drive will have the “deleted” file bits. However, most consumer tools will just take an image that only copies the standard files. It’s faster and makes for a smaller image. As Android Underground said, the full image is useful except for forensics.


kashif faridi

quite hlpful !!



here’s another way but it works, fill your hard with dummy data then delete it, how to do it, delete your data normally (select=> right-click => delete), copy any DVD to your HDD, and copy it again, and copy and copy :P

I know this way looks so dummy, but believe me no one can recover the old critical data that you had on your HDD ;)


Robert Ruedisueli

It’s best to reinstall the OS fresh after you wipe it.

You also may want to “zero” the SSD even if you have a system that marks sectors for deletion.

Sectors marked for deletion CAN be recovered on some drives, simply by unmarking them for deletion before scanning the sector. However, this is a more complex process than HDDs, and would require an expert. Your average script kiddy couldn’t pull that one off.



I use the BFH Drive Eraser to make sure personal data is inaccessible, then install a new HD and the re-install the O/S.


Zhong J

Maybe you can discuss more about tools using in a Linux system, this article is a good idea to sell your used laptop to someone else and what to do before selling your machine.


Linux is actually very easy. Using Parted Magic or SystemRescueCD or similar distro you do Dept. of Defense spec overwrite of the HD to securely destroy any personal/sensitive data. Then just re-install the distro.

As you well know you do not need anybody’s permission to install or re-install Linux. Linux O/S is not permanently tied to the hardware configuration that it was originally installed on. The same CD/DVD can be use to install Linux on an infinite number of PCs.


vineed g

dban great tool,but for ccleaner we can use cipher command to wipe free space in a drive that is much easier ,isnt it?


Phill Duplessis

Nice thing you share


Scott MacDonald

Seems like a bit of misnomer, as the solutions all seem to require re-installing, which doesn’t really leave it in tact, but puts it back in place. I can’t think of a way to format around an OS, unless it’s on a separate partition.


In past days there were ways to null out space not identified by the File Allocation Table as in use. I do not know if anything today has that capability.



Or you can erase the whole disk while installing your Ubuntu and it’s derivatives OS, just select the “erase entire disk” option while installing.


Guy McDowell

“Using a drive-wiping tool on a solid-state drive is actually a very bad idea, as the additional writes can reduce a drive’s lifespan.”

Good call. A lot of tech’s miss the fact that SSDs have a limited number of read-write cycles before they fail. SSDs are great, and I personally believe they are better than HDDs, but salespeople tend to gloss over this fact.

Chris Hoffman

Yup, for most people this shouldn’t be a problem given average drive lifespans — but you don’t need to go out of the way to write additional sectors. If nothing else, performing a wipe just wastes your time by trying to delete sectors that are already deleted.



Would be a nice idea to list other OS’s to do this also…….NOT everyone uses garbage Windows !!!

Chris Hoffman

Well, a tool like DBAN will work on every OS, so the process is similar. Just reinstall the OS you want to use afterwards.


Don Gateley

I was sorta hoping this article would tell me how to do what it said it was going to tell me. Wipe my drive and leave the os.

skye conway

I totally agree, is there a way to ” …. Erase the Hard Drive keeping the OS in tact?”

Chris Hoffman

Sorry that you were expecting something else from the article. There’s no way to actually wipe the drive and just leave the OS files in a single operation, so this is the best you can do. These processes give the same results.


Chiranthaka Jayakody

A useful article!



So you want to get rid of your computer. To keep your data secure — whether it’s financial records, business information, or anything else private that you don’t want people snooping through — you’ll want to securely wipe the hard drive. This ensures that no one can recover the deleted files.

Your comment