What to do when giving away an old computer

Say you have an old computer that you wish to get rid of: give away, donate to charity, let a friend enjoy it for a few more months before it dies, maybe even sell it. Whatever you decide, you might be faced with a big question. What kind of steps do you need to take to make sure that your data is not going to be used by the new owners? This article will teach you about different methods designed to ensure your private data will not fall into wrong hands when you dispose of the hardware that previously stored it.

There are several scenarios that you need to take into account. These will determine what kind of action is required of you when giving away old computers.

- Computer without a hard disk

- Computer with a blank/empty hard disk

- Computer with a hard disk and a freshly installed operating system

- Computer with a hard disk and an existing operating system

Computer without a hard disk

This is the simplest scenario. You're giving away a heap of functional metal and plastic. The hard disk remains in your possession, which means no personally identifiable data remains in that box, save maybe food leftovers and skin flakes. You have nothing to worry about.

Computer with a blank/empty hard disk

The big question is - is this a new hard disk or not? If this is a new hard disk never used before, then same rules apply as the case above. However, if you are reusing a hard disk, some caution is necessary. The fact your disk may have been formatted to appear new and clean does not mean the underlying data is not accessible.

Disk data deletion is a tricky process. Actual data, sequences of zeros and ones are rarely completely erased, because this is a slow and costly operation. It is much simpler to let the operating system know that certain blocks of data are no longer in use and can be written over. For all practical purposes, the data remains there, only it is invisible by the filesystem. A skilled user could easily access that data, potentially exposing private information that you thought safe or meant to keep safe.

You might even assume that formatting the disk would make the data inaccessible. Or you may even opt for deleting data partitions. In both cases, the deletion is a quick, almost symbolic operation, with pointers to logical structures defining the data storage being removed, without actually touching the data.

The only way you can really make sure your old data is never accessible again is by performing a low-level format, which is a slow scrubbing process of each and every byte of data on your disk and that can take several hours to complete.

Low level formatting

Computer with a freshly installed operating system

If you give away a computer with a new system installed, there's a decent chance that you have formatted the disk beforehand. This means that old data may have been overwritten, at least parts of it. However,  if your previous setup revolved around a single large partition with lots of free disk space and a high degree of fragmentation, it's possible most of your data remains untouched by the new installation. Once again, you face the same challenges as with an old but empty disk. Low-level formatting is required to ensure the data is forever lost before performing a new system installation.

Computer with a previous operating system

This is the trickiest scenario of all. You intend to give away your computer as is. However, you want to make sure your personal data is erased. So you delete your documents and your browser profile. But what about your software licenses, application settings, caches, temporary files, etc?

Let me begin by saying that you should never do this. However, if you decide to disregard my advice, then here's a handful of tips that might help you hide away some of your previous data, with no guarantee of absolute success.


On Windows, you will have to work hard to remove all and any trace of your existing programs. The main reason for this is the registry, a binary database-like hive of information that Windows relies upon to operate normally. The registry contains all sorts of key-value pairs of data, including possibly private information, software activation serials, user identification and other details. It is virtually impossible to make sure all these keys are removed when uninstalling software. Even if you attempt a manual cleaning process, you may miss some of the registry keys.

In general, your identity-purging process should be as follows:

Delete all personal data in user folders, like My Documents, My Music, etc.

Uninstall all software you do not wish to give away to the future owner.

Launch a system cleanup tool like CCleaner and scrub away as much as possible.

Open your user folder, e.g. C:\Users\Dedoimedo and carefully go through every single sub-folder, deleting files, settings, profiles, etc. This way, you will most likely eliminate an embarrassing situation where your favorites or download history are carried over into the uncertain future.

Reboot your system.

Repeat the procedure once more, making sure you missed nothing.

However, I repeat this is not an ideal way of making sure your data remains private. I must highlight the previous point of data deletion, which is merely a removal of pointers to data structures on the disk, making existing bytes readable to a determined and skilled user.

The combination of a very tricky layout of data kept in multiple locations, incomplete registry cleaning and partial software removals, and insecure data deletion all make it virtually impossible to guarantee complete disposal of personal data on a giveaway machine.


Cleaning personal data on Linux is much simpler. All of your user settings are stored in your home directory, e.g. /home/dedoimedo. Therefore, in order to create a fresh new environment for the future user, you merely need to create a new user and then delete the existing one.

If you wish to give them your existing user, you will have to delete your personal configurations from the home directory. These settings are kept in hidden directories and files prefixed with a dot (.), hence if you delete all dot entries, you should be fine. However, you might break some things, including your ability to continue working in your existing session, so you might want to do this from a live CD.

Additionally, you will need delete your actual data. If you are interested in secure deletion, Linux comes with a handful of useful utilities, like shred. Alternatively, you can simply fill your disk with zeros using dd once the deletion is complete.

Lastly, if you are running a Debian and/or Ubuntu-based distribution, you might be interested in Remastersys, a tool designed to create bootable images of your installed system with or without personal data included, and then use that as the basis for the subsequent giveaway, without having to go through a long and tedious process of reinstalling everything from scratch. I also have a tutorial on the topic, if you're interested.

Remastersys GUI


A good deed can also be a safe deed. When you plan on giving away an old computer, basically it comes down to your hard disk. Do you plan on giving it away or no? If you do, things start to get a little more complicated, but there are several degrees of complexity before you.

A smart combination of low-lever formatting and a fresh installation is probably the best option. Giving away an existing operating system comes with a handful of risks that cannot be easily mitigated, so you should treat this as the least preferable choice. However, you can still reduce the risks by a careful deletion of data, user preferences and application profiles. In this regard, Linux has the upper hand, due to a simpler structure, lack of registry and several built-in tools that make data deletion safer. Well, that would be all. Now, it's up to you to be the good Samaritan.




About the author:
Igor Ljubuncic aka Dedoimedo is the guy behind dedoimedo.com. He makes a living out of his very hobby - Linux, and holds a bunch of certifications that make a nice pile in the bottom drawer.

Share this
Average: 4.4 (18 votes)
Your rating: None


by der (not verified) on 25. April 2012 - 7:14  (92574)

Should I test CentOS perhaps? Or something else? Well, do let me know.

Will be much better to try Ubuntu/Kubuntu 12.04, Mageia 2 and Bodhi Linux. Maybe you`ll have some time to see Rosa Desktop, and some application: Klook, ROMP, Stackfolder and Takeoff Launcher.

Thank You!

P.S. Here it was a possibility to write.

by Dedoimedo on 15. June 2012 - 17:34  (94926)

Not sure I follow ...

by Roberto (not verified) on 18. April 2012 - 14:22  (92251)

If we don't trust erasing processes, would a clean reinstall + filling the disc with new data (a folder with some gig of .avi and then copy that folder again and again up to filling all the space on the disk is a very easy operation) would do most of the trick.
In theory, there will remains some bits in the slack space at the end of the files, but with big files this would mean some kb in the full disk.
I think this can be a good solution too.

Removing files manually without reinstalling is NEVER a good solution, no one can be really sure to have cleaned everything, of course.

by Dedoimedo on 18. April 2012 - 18:10  (92262)

The answer is - maybe. In theory, it should work, but you do not really have any control how data is written to the disk - whether in contiguous blocks or in fragments and whatnot.

Doing a clean zero write is the most methodical way of ensuring that, especially if you have large disks - do you really want to fill them with 700-800gb of movies of data just to make the previous data unusable, but now you have new data there :)


by Mr Wdhpr (not verified) on 15. April 2012 - 23:24  (92143)

I've actually learned this lesson the hard way. I sold my old Pentium computer to my uncle and he found some files I missed aka some very embarrassing e-mails to an old flame... live and learn

Helpful article

by Burn-IT on 15. April 2012 - 8:54  (92123)

Many or most of the disk de-fragmentation tools also have the ability to securely wipe the free space.

To Davey. If the disk is dead why leave it in the machine??

by Davey (not verified) on 14. April 2012 - 22:54  (92107)

I have a PC with a dead hard drive. The question is how to render the data on that drive inaccessible before disposing of the PC.

by Dedoimedo on 15. April 2012 - 8:49  (92122)

I would not be giving away that disk.
I'd shred it - physically.

by JamesM (not verified) on 14. April 2012 - 21:59  (92101)

Completely useless information, the article pointed out the need but did not provide a method. the article did not address the methods and tools for secure data or partition overwrite. Be it the whole disk, the disk less the OS recovery partition, or just the free space on the disk.

(A) Donate without hard disk no problem. But an older desktop or mini-tower computer without a hard disk is little use to anyone and is basically a pile of scrap. (Not so with laptops, the parts being more unique and therefore useful when second hand.)

(B1) If you want a completely blank hard disk, FIRST do an OS install key recovery, write the result on the box so the next person can re-install, then do destructive overwrite with something like Dan B's Boot&Nuke. Send on with the orignal install media.

(B2) Many hard disks have a small os recovery partition, often accessible during boot by a special key like F11. In that case please preserve the OS recovery partition and just do a secure destructive overwrite of the other partitions on the disk. By preserving the orignal OS recovery partition you allow the correct version of the OS to be re-installed using the orignal machines OS install key, that is either on a sticker on the box or you recovered before the partition was obliterated.

(C) Before install of fresh OS, recover OS installation keys for OS and other passed on software, make sure you have installation media or working recovery partition. Do option B1 or B2 above depending on if you are using the existing recovery partition or orignal media. Make sure you do a secure overwrite of all partitions to be deleted. Then do fresh install with previously recovered keys.

(D) With old OS, migrate all personal data to new PC then remove you My Documents and other data directories, and then delete all web history and cookies, and all email identities. I suggest a full OS cleanup with Anti-virus and Malware scans. (Not going into procedure here).

Then change Administrator user password and write it down, and then login as Administrator. Then completely remove all user profiles and user settings for other users, everyone except Administrator id.
Then running full 'Ccleaner' delete, with all possible options checked on all tabs.
I suggest you uninstall browsers and email clients, deleting directories and re-installing and run Ccleaner again, with all possible options checked on all tabs including the wipe free-space option.

Finally a through secure destructive overwrite of all free space with something like 'Erasure'.

by bernardz on 15. April 2012 - 14:40  (92132)

What is wrong with just ccleaner and setting diskwiper to clean out everything with say with 3 wipes? Why do you need to do anything else?

by Dedoimedo on 15. April 2012 - 8:48  (92121)

You seemed to have missed the 'dd' reference.

by Limao Luo (not verified) on 15. April 2012 - 2:15  (92113)

Did you notice the hyperlink from the words "low-level format" in the article points to dedoimedo's article on the subject?

by Ioannis A. (not verified) on 14. April 2012 - 19:29  (92097)

DBAN or similar solution. I carry out this operation using a Linux live CD called Parted Magic (http://partedmagic.com/doku.php) though I predominantly use Windows.

It comes with a script called "dd" marked as an application which lets you choose how to best nuke the hard-drive, with several overwrite algorithms.

Afterwards, just reinstall the operating system. It's something of a hassle if we're talking about Windows but Mac OS and most Linux distributions reinstall very easily and fast, with minimal user input needed. It's not that hard, plus the people that get the computer get to do the initial setup themselves.

by jmaloney on 14. April 2012 - 19:05  (92095)

I gave away two computers and several used hard disks last year, to a PC repair shop that builds computers for school kids. To clean the disks I used Darik's Boot and Nuke http://www.dban.org/. It worked great.

Gizmo's Freeware is Recruiting!

Gizmos Needs YouShare your knowledge of free software with millions of Gizmo's readers by joining our editing team.  Details here.