Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an old laptop that is running Ubuntu. Now I want to give away this laptop, but I want to remove all private data. So what should I remove? I don't want to format the whole system, because the OS will be still in use by the new owner.

share|improve this question
For Windows:… – random Apr 11 '11 at 17:11
The only 100% way is to erase the hard drive and reinstall Ubuntu, any other method risks revealing your private data. See this page for erasure… – Moab Apr 11 '11 at 17:12
@ random, how is this going to help with an Ubuntu installation? – Moab Apr 11 '11 at 17:13
Steps are the same across OS, but the tools you use may be different. @moa (no space) – random Apr 11 '11 at 17:22
up vote 5 down vote accepted

Like it was said in the comments above, the only sure way of making sure that none of your private info is on the disk is to simply reinstall Ubuntu. It will take a whole 20ish minutes but it's well worth it.

It's also not just the issue of hiding the information from the person who receives the laptop, but the possibility of the computer being rooted and your information being stolen. Like it was said, simply reinstall Ubuntu.

If you're EXTRA paranoid, you can format the drive and run a disk wiping utility (think Data Dump), then reinstalling Ubuntu.

share|improve this answer
It's hardly paranoid to assume that someone will try to undelete files on your hard drive. It's so easy, I would expect any tech-savvy person to do it as a matter of course when they find a second hand hard-drive. There's little risk, and it can be entertaining, if nothing else... – naught101 Nov 19 '12 at 21:14

If(!) you only stored your stuff inside your home directory, then delete it and you're done:

  1. create an account with admin rights: newOwner
  2. login as newOwner
  3. delete /home/yourOldAccount

This is not only a quick solution but an insecure one too. Even the deleted files are recoverable by the new owner.

Recommendation: Follow Moab's comment.

share|improve this answer

You still have the option of deleting the homes of the current users and then securely erase the free space. There are many utilities that can do this under Linux, e.g. scrub. Since Lucid it is included in the Ubuntu repository, so all you have to is install it using Synaptic.

You should also delete old/archived system logs (can be found in /var/log), and check the root account (even if it's only been used for administration).

In my opinion securely erasing the disk and then reinstalling the OS is the best choice.

share|improve this answer
the native way to do it is 'shred' – Journeyman Geek Apr 11 '11 at 21:32
shred only erases files though, while scrub wipes the free space. Since scrub creates a number of files until there is no free space and subsequently erases them, you could do the same with shred but you would need to automate that yourself. – plco Apr 11 '11 at 23:26

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.