Helping people with computers... one answer at a time.

Before giving away a machine or returning a loaner it's important to remove personal information from it. That's both harder and easier than you think.

I'm about to give away my machine, but I want to leave Windows installed. How can I delete permanently everything except the OS?

Ultimately, you really can't.

It depends a lot on how paranoid you are about the various and sundry traces left on a machine that you've been using a while.

I'll describe a few steps that will delete a lot - perhaps even enough for your concerns.

But everything? There's only one way to do that.

Delete and Uninstall as much as you can

Naturally the process starts where you might expect: by deleting your data files and uninstalling all the programs that you've used or added and don't want to be part of the machine when it's re-used by someone else.

For your data files, that means removing things from My Documents and wherever else you happen to keep data files.

"The problem with this approach is that you don't know what you might have missed."

A good start for programs is to take a walk through the Add/Remove programs application in the Contol Panel and just start uninstalling.

For extra security you might want to use Revo Uninstaller instead of control panel. Revo not only lists more things, but it also uninstalls more thoroughly. (It has a couple of levels of "aggressiveness" in determining what to remove, and this is one of the cases where it might make sense to risk being as thorough as possible.)

Remove All Login Users but Administrator

Removing all the users on the machine other than the required Administrator account should delete a plethora of files and settings associated with those users.

Clean Crud

Run the built-in Disk Cleanup Utility, or better yet, grab a copy of CCleaner, (a free download - you do not need to buy support) and use it to clean up as much as it can.

The goal here is to remove traces from browser caches, temporary files, and a host of other things - many of which might well be benign, but many others might inadvertently contain things you'd rather not share with your machine's subsequent owner.

You might consider running a registry scan. I'm not a big fan of registry cleaners, but this is a case where they might remove additional information you don't want left behind, and the cost of failure (an unbootable machine) is relatively low. You may want to take an image backup prior to the cleaning just in case you want to be able to recover from that worst case scenario.

Turn Off Some System Files

Set your virtual memory to zero and delete the paging files.

Turn off Hibernation, and remove the hibernation file.

Turn off System Restore.

All of these can contain private information, and can be turned back on by the machine's new owner should they so desire.

Secure Erase the Empty Space

Using a tool like SDelete to securely erase the unused space on your hard disk. By default just deleting files doesn't overwrite the data, and it could still be recovered. Tools like SDelete actually overwrite all of the unused space on your hard drive with random data so as to completely remove all traces of what had been stored there before.

That's about as good as you can get using this approach.

What Might Be Missed

The problem with this approach is that you don't know what you might have missed.

There might be system files that contain information about you. Registry settings that remain even after all the deletion and cleaning above that contain settings for programs - perhaps even programs no longer installed - that indicate something about who you are or what you used the machine for.

You just don't know.

And that's why it's not an approach I ever recommend.

Nuke It Instead

Using a tool like DBAN, erases the hard drive completely. It's easy, and every single bit of every single byte - operating system, settings, programs and data - is removed from the hard drive.

Including all your personal information.

Then, if you like (and if you can) reinstall the operating system from an install disk.

If you don't have one, then perhaps grab a copy of Ubuntu Linux, and install that.

But erasing the hard disk completely is the only way to be absolutely sure that you haven't left personal information on the machine prior to handing it off to someone else.

Well, that or remove the drive and give them the machine without it. But even then you'll want to erase the drive before disposing of it.

Article C4716 - January 20, 2011 « »

Share this article with your friends:

Share this article on Facebook Tweet this article Email a link to this article
Leo Leo A. Notenboom has been playing with computers since he was required to take a programming class in 1976. An 18 year career as a programmer at Microsoft soon followed. After "retiring" in 2001, Leo started Ask Leo! in 2003 as a place for answers to common computer and technical questions. More about Leo.

Not what you needed?

January 20, 2011 11:17 PM

You should also know that even simply formatting the hard disk might not suffice in eradicating your data if you're really truly paranoid or truly need that level of security.

If you want your data inaccessible by the new owner you'll have to remove the disk and install a brand-new one. For the old one, if you want to safely dispose of it, you'll need to go the hammer way. That is to physically and thoroughly destroy the disk. And no, just because when you connect it to your computer the computer can't read it does not mean that no-one else can't read it either.

Of course Leo has talked about using encryption for your disks before If you were in the habit of formatting and encrypting the disk before using it even once then a simple format would be quite safe, because the data, even if retrieved, would be unintelligible without the password / keyfiles.

Of course that's rather extreme and guessing from your being here to ask advice on how to secure data you really don't need that level of extreme measures to protect yourself. Just start with encryption from day 1 for the next system you build and go for a fresh install when you decide to give it away. It's always safer that way.

Ken B
January 21, 2011 7:34 AM

Since you mention CCleaner, you may want to know that the new 3.x version includes the ability to securely wipe the freespace of a drive, as well as the entire drive itself:

"A new Drive Wiper tool screen under the Tools section, which allows users to securely erase the contents or free space on a specified drive."

(Though I'd still probably use DBAN to wipe an entire drive.)

Greg Bulmash
January 21, 2011 9:25 AM

I recall wiping a mac recently. The number of passes for overwriting data they offered were... 1, 5 (DoD spec compliant), and 35. So to be security compliant with DoD (Department of Defense) specs, you have to do the wipe/overwrite process 5 times. Some people, however, require more.

January 25, 2011 8:46 AM

I wipe my free space about every two months. It really speeds up my system. As I keep almost all my files on external HDD this can take some time! I have used File Shredder for years, when I wipe my free space with it I usually go for the 3 pass.(DoD) On my 419gb free of 494gb usable internal, this takes about 9/10 hours. I just tried a newer program East-Tek Eraser that I used to wipe the last 2 times,using the 7 pass "stop hardware recovery" setting. This takes a whopping 16 1/2 hours! Have also used the Guttman setting once 35 passes, and will never again because of the time involved. A 3 to 7 pass should be enough for almost anyone.

January 25, 2011 8:50 AM

As a add on to my above post....... Make sure that you do everything else before you run the wiper. By this I mean, Empty the recycle bin,delete all programs/files/whatnot you dont want,run defragger. Then wipe. This WILL speed up your system.

Jon Vance
January 25, 2011 12:44 PM

I'm surprised you didnt mention CCleaner by Piriform to remove a lot of stuff. It also does some of the stuff Revo does, but in a way most users find easy to understand.
Also, by creating a new user in an operating system, deleting the old users can have a cleanup effect which even allows some erroneous settings to be restored. Why wasnt this mentioned in your article? Any crud left over can then be easily removed using Revo or Ccleaner's uninstall utility.

Jon Vance
January 25, 2011 12:45 PM

Whoops yes you dis Sorry. Ignore the comment about that...

January 25, 2011 3:33 PM

I have had to purge many computers many times. I am the IT Help for several small local businesses, and regardless of company rules, employees continually add junk to office machines.

Follow the usual steps to Control Panel > Remove Programs, and then look at the folders. In my case, there will be a great many mystery folders and I have no idea what they are for.

So, after the usual cleaning, I add and "X" to the unknown folders. The folder, "Mystery" becomes "Mysteryx"

Now we continue to operate the comuter, reboot a few times, and if no problems surface, I delete the folder.

If a problem occurs, you can boot to Safemode, remove the "X" and then dig deeper to learn what this mystery folder is used for.

January 27, 2011 3:29 AM

After recently parting ways with my employer, I had to return my laptop which I must admit included a fair bit of extra -unrelated- junk from my weird techie side habits. I went through most of what Leo said, but not the part including turning off sys files etc. There were things I didn't want potential snoopers to find, so I downloaded a program called Eraser which does exactly what SDelete does. It wiped a lot of stuff away in a systematic and straight forward way. All in all, I am comfortable believing I left very little traces behind, but as Leo says, it really depends on how paranoid one is about the data on the machine.
Alternatively, if I were selling my machine, there is no question I would have nuked it, as I did with a previous-previous job's laptop as well. I have no qualms about doing that at all to satisfactorily cover all traces.

January 27, 2011 6:02 AM

Is it really worth it to sell the computer? The only really sure way to insure no one finds anything is to trash the hard drive and trash the rest of the computer. This is hard to do but psychologically worth it. There always could be stuff on there even after nuking the system I think. Call me paranoid but I sleep nights.

If you nuke the hard drives (all hard drives if more than one), then I believe selling a machine with an empty hard drive is safe.

February 1, 2011 6:42 AM

Thanking you Leo.
As usual, another informative article. Having previously 'looked around' regards disk cleansing, I'd like to share my comments since more knowledge never hurts. Perhaps the readers may know further security in making their tool selection for what is after all potentially capable of major repercussions at both personal and financial levels should sensitive data remain on the supposed cleansed disk.

Readers are encouraged to look further afield in their quest for a real security disk wipe utility.
Perhaps as a starter:

Please pay particular attention to "Secure Erase" and it's authorship pedigree and the host of governmental and legal requirements which it satisfies. Additionally, numerous governmental agencies and commercial bodies use this 'approved' tool.
Note that it is free for download (and usage - aka: freeware)

In your research, you will also note that DBAN "does not" satisfiy any technical or legal regulatory requirements (NIST 800-88) of any security departments or 'in the know' disk scientists etc. Note that it is known that DBAN will not cleanse a remapped block...
In the U.S.A, there are stringent legal requirements placed upon those that embark on disk cleansing. Failure to comply can lead to $250k fine and even 10years in jail...

Ultimately, if money to burn then fork out for NSA approved degausser :)

March 16, 2011 9:40 AM

ComputerWorld reports (March 7, 2011) that recovering data from both SSD drives and flash drives is incredibly easy even after being overwritten.

This article requires you to sign up. But it is harmless to do so. Remove the check marks from both boxes and you will not get any additional mailings. At least that is my experience.

This article is scary and should be required reading.

February 13, 2012 7:34 AM

How do I remove all users except "administrator"...and where do I go to find it? I am unable to update my browser, download Adobe to see any videos, or anything. Any help would be appreciated. thanks

Mark J
February 13, 2012 1:14 PM

Windows 7: from the Control Panel click on User Accounts, then click Manage Other Accounts, click on the icon for the account you want to remove and then click on Delete the Account. From there, follow the prompts and decide whether you want to remove the data files and then confirm the delete.

Windows XP: from the Control Panel click on User Accounts, click on the icon for the account you want to remove and then click on Delete the Account. From there, follow the prompts and decide whether you want to delete the files and then confirm the delete.

Vista should be somewhat similar.

You may want to back up any data from the account before deleting it and choosing the Delete Data option.

February 19, 2013 6:25 AM

i unconciously deleted my administrator. but then i had made a new administrator. But i cant access those programs that was saved in my deleted administrator. Unknowingly, I went to documents and settings looking for the folder of my administrator which i had deleted and i tried to copy all folders in there and i tried to paste those in my new administrator but my hard disc had reach to its fullest storage, so i go back to documents and settings and look again for the folder of the administrator i deleted before, and decided to erase all data folders in there.
now, i cant find any of it. but even i deleted all those, my hard disc size is still the same,means that the files from the folder of the administrator was still in my machine, but i cant find it. My Local Disc C: turns into color blue letters,unlike the other drives which is just black.
What is the possible problem of my laptop???
i am using a hp mini 2133 windows xp home edition.
Is there any way that i could bring back my old settings?or whats the best thing i could do to fix this problem?

Comments on this entry are closed.

If you have a question, start by using the search box up at the top of the page - there's a very good chance that your question has already been answered on Ask Leo!.

If you don't find your answer, head out to to ask your question.